Add some tolerance for slow chains
This commit is contained in:
parent
61d655a269
commit
2292de6e19
@ -94,7 +94,7 @@ describe("CosmWasmClient", () => {
|
||||
|
||||
const height2 = await client.getHeight();
|
||||
expect(height2).toBeGreaterThan(0);
|
||||
await sleep(blockTime);
|
||||
await sleep(blockTime * 1.3); // tolerate chain being 30% slower than expected
|
||||
const height3 = await client.getHeight();
|
||||
expect(height3).toBeGreaterThanOrEqual(height2 + 1);
|
||||
expect(height3).toBeLessThanOrEqual(height2 + 2);
|
||||
|
||||
@ -82,7 +82,7 @@ describe("CosmosClient", () => {
|
||||
|
||||
const height2 = await client.getHeight();
|
||||
expect(height2).toBeGreaterThan(0);
|
||||
await sleep(blockTime);
|
||||
await sleep(blockTime * 1.3); // tolerate chain being 30% slower than expected
|
||||
const height3 = await client.getHeight();
|
||||
expect(height3).toBeGreaterThanOrEqual(height2 + 1);
|
||||
expect(height3).toBeLessThanOrEqual(height2 + 2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user