Skip to content

Commit

Permalink
Fix failing test checkpoint test
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Nov 22, 2024
1 parent 645d33f commit 971bf3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion systest/tests/checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestCheckpoint(t *testing.T) {

tctx := testcontext.New(t)
addedLater := 2
size := min(tctx.ClusterSize, 30)
size := min(tctx.ClusterSize, 20)
oldSize := size - addedLater
if tctx.ClusterSize > oldSize {
tctx.Log.Info("cluster size changed to ", oldSize)
Expand Down
4 changes: 4 additions & 0 deletions systest/tests/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func sendTransactions(
return fmt.Errorf("get nonce failed (%s: %s): %w", client.Name, cl.Address(i), err)
}
deadline := cl.Genesis().Add(time.Duration(stop+1) * layerDuration)
minimum := time.Now().Add(2 * layerDuration)
if deadline.Before(minimum) { // make sure we have at least two layers to submit transactions
deadline = minimum
}
ctx, cancel := context.WithDeadline(ctx, deadline)
defer cancel()
watchLayers(ctx, eg, client, logger, func(layer *pb.LayerStreamResponse) (bool, error) {
Expand Down

0 comments on commit 971bf3e

Please sign in to comment.