Skip to content

Commit 6e12933

Browse files
Seulgi Kimsgkim126
authored andcommitted
Reduce the failure rate of testing total shutdown
Currently, the test frequently failed. This test changes the validator set to the nodes which are not started yet and starts all new validators when the term changed. What I found is they are far behind than the best chain, and they cannot create a block until timeout because they are synchronizing. I think it's because of the slow synchronization, but fast synchronization is hard to achieve in the near future. So this patch made the new validator nodes keep alive while creating the blocks that set initial states. It may not be a perfect solution, but it reduces the test failure rates dramatically.
1 parent 7c2a0d7 commit 6e12933

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/src/e2e.dynval/2/dv.shutdown.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,7 @@ describe("Shutdown test", function() {
212212
delegation: 1000,
213213
deposit: 100000 - i // tie-breaker
214214
}))
215-
],
216-
async onBeforeEnable(allNodes) {
217-
for (const node of getValidators(allNodes).nodes) {
218-
await node.clean();
219-
}
220-
}
215+
]
221216
});
222217

223218
it("only a term closer should be a validator after a complete shutdown", async function() {

0 commit comments

Comments
 (0)