Skip to content

Commit

Permalink
Restore sleep between launches for stable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jun 10, 2022
1 parent b35877f commit c1271b2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/rpc/system_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,21 @@ func TestStableNetworkRPC(t *testing.T) {
}

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

nodes.InitAndStartTest(ctx, t, cancel)
for _, node := range nodes {
node.InitAndStartTest(ctx, t, cancel)
const timeBetweenStart = 0 * time.Second
timer := time.NewTimer(timeBetweenStart)
select {
case <-timer.C:
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return
}
}

for _, node := range nodes {
node := node
Expand Down

0 comments on commit c1271b2

Please sign in to comment.