Browse Source

serialize async method

feat/estimateFee-limit
Ivan Socolsky 8 years ago
parent
commit
77ddbb0ca2
No known key found for this signature in database GPG Key ID: FAECE6A05FAA4F56
  1. 5
      test/integration/server.js

5
test/integration/server.js

@ -1142,9 +1142,10 @@ describe('Wallet service', function() {
it('should create many addresses on simultaneous requests', function(done) { it('should create many addresses on simultaneous requests', function(done) {
var N = 5; var N = 5;
async.map(_.range(N), function(i, cb) { async.mapSeries(_.range(N), function(i, cb) {
server.createAddress({}, cb); server.createAddress({}, cb);
}, function(err, addresses) { }, function(err, addresses) {
var x = _.pluck(addresses, 'path');
addresses.length.should.equal(N); addresses.length.should.equal(N);
_.each(_.range(N), function(i) { _.each(_.range(N), function(i) {
addresses[i].path.should.equal('m/2147483647/0/' + i); addresses[i].path.should.equal('m/2147483647/0/' + i);
@ -1189,7 +1190,7 @@ describe('Wallet service', function() {
it('should create many addresses on simultaneous requests', function(done) { it('should create many addresses on simultaneous requests', function(done) {
var N = 5; var N = 5;
async.map(_.range(N), function(i, cb) { async.mapSeries(_.range(N), function(i, cb) {
server.createAddress({}, cb); server.createAddress({}, cb);
}, function(err, addresses) { }, function(err, addresses) {
addresses.length.should.equal(N); addresses.length.should.equal(N);

Loading…
Cancel
Save