Skip to content

Commit

Permalink
chore: wait more time
Browse files Browse the repository at this point in the history
  • Loading branch information
iosh committed Oct 18, 2024
1 parent ec25da8 commit f11bed0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions __test__/customConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ beforeAll(async () => {
WS_PORT = jsonrpcWsPort;
const server = await createServer({
nodeType: "full",
devBlockIntervalMs: 50,
devBlockIntervalMs: 100,
miningAuthor: TEST_MINING_ADDRESS,
jsonrpcHttpPort: jsonrpcHttpPort,
jsonrpcWsPort: jsonrpcWsPort,
Expand All @@ -34,7 +34,7 @@ beforeAll(async () => {

await server.start();

await wait(4000);
await wait(10000);
return () => server.stop();
});

Expand Down
12 changes: 4 additions & 8 deletions __test__/genBlocksInterval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ beforeAll(async () => {
const [jsonrpcHttpPort, udpAndTcpPort] = await getFreePorts();
HTTP_PORT = jsonrpcHttpPort;
const server = await createServer({
devBlockIntervalMs: 50,
devBlockIntervalMs: 100,
tcpPort: udpAndTcpPort,
udpPort: udpAndTcpPort,
jsonrpcHttpPort: jsonrpcHttpPort
Expand All @@ -28,20 +28,16 @@ describe("genBlocksInterval", () => {
transport: http(`http://127.0.0.1:${HTTP_PORT}`),
});

await wait(500);
await wait(1000);
const status1 = await client.getStatus();
expect(status1.epochNumber).toBeGreaterThan(1);

await wait(500);
await wait(1000);
const status2 = await client.getStatus();
expect(status2.epochNumber).toBeGreaterThan(status1.epochNumber);

await wait(500);
await wait(1000);
const status3 = await client.getStatus();
expect(status3.epochNumber).toBeGreaterThan(status2.epochNumber);

await wait(500);
const status4 = await client.getStatus();
expect(status4.epochNumber).toBeGreaterThan(status3.epochNumber);
});
});

0 comments on commit f11bed0

Please sign in to comment.