Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Jun 21, 2024
1 parent c819e6b commit 2126c03
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions x/sync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,8 @@ func Test_Sync_Result_Correct_Root(t *testing.T) {
require.NoError(syncer.Start(ctx))

// Simulate writes on the server
for i := 0; i <= 1_000; i++ {
// TODO more than a single write when API is less flaky
for i := 0; i <= 1; i++ {
addkey := make([]byte, r.Intn(50))
_, err = r.Read(addkey)
require.NoError(err)
Expand All @@ -964,10 +965,8 @@ func Test_Sync_Result_Correct_Root(t *testing.T) {
targetRoot, err := dbToSync.GetMerkleRoot(ctx)
require.NoError(err)

if i%10 == 0 {
// Simulate client periodically recording root updates
require.NoError(syncer.UpdateSyncTarget(targetRoot))
}
// Simulate client periodically recording root updates
require.NoError(syncer.UpdateSyncTarget(targetRoot))
}

// Block until all syncing is done
Expand Down

0 comments on commit 2126c03

Please sign in to comment.