Skip to content

Commit

Permalink
Testing with delays
Browse files Browse the repository at this point in the history
  • Loading branch information
c-geek committed Sep 26, 2016
1 parent 4ed7ae7 commit 4535fff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/integration/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ describe("CLI", function() {
let res = yield execute(['config', '--autoconf']);
res.should.have.property("ipv4").not.equal("a wrong string");
res.should.have.property("ipv4").match(constants.IPV4_REGEXP);
if (process.platform === 'win32') yield new Promise((resolve) => setTimeout(resolve, 500));
}));

it('reset data', () => co(function*() {
yield execute(['reset', 'data']);
const res = yield execute(['export-bc', '--nostdout']);
res.should.have.length(0);
if (process.platform === 'win32') yield new Promise((resolve) => setTimeout(resolve, 500));
}));

it('sync 2200 blocks (fast)', () => co(function*() {
Expand All @@ -133,13 +135,15 @@ describe("CLI", function() {
const res = yield execute(['export-bc', '--nostdout']);
res[res.length - 1].should.have.property('number').equal(2200);
res.should.have.length(2200 + 1);
if (process.platform === 'win32') yield new Promise((resolve) => setTimeout(resolve, 500));
}));

it('sync 5 blocks (cautious)', () => co(function*() {
yield execute(['sync', fakeServer.host, fakeServer.port, '2204', '--nointeractive']);
const res = yield execute(['export-bc', '--nostdout']);
res[res.length - 1].should.have.property('number').equal(2204);
res.should.have.length(2204 + 1);
if (process.platform === 'win32') yield new Promise((resolve) => setTimeout(resolve, 500));
}));

it('[spawn] reset data', () => co(function*() {
Expand Down

0 comments on commit 4535fff

Please sign in to comment.