Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix flaky TestMempoolSnapshotInTheMiddle #2719

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/chain/statemanager/sm_gpa/state_manager_gpa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,10 @@ func TestMempoolSnapshotInTheMiddle(t *testing.T) {
responseCh := env.sendChainFetchStateDiff(oldCommitment, newCommitment, nodeIDs[1])
require.True(env.t, snapm1.WaitSnapshotLoadRequestCount(1, 10*time.Millisecond, 100)) // To allow snapshot manager to receive load old state snapshot request
env.sendTimerTickToNodes(100 * time.Millisecond) // To check the response from snapshot manager about loaded old state snapshot; timer tick is not necessary: any input would be suitable
require.True(env.t, snapm1.WaitSnapshotLoadedCount(1, 10*time.Millisecond, 100)) // To allow snapshot manager thread to wake up and respond
require.True(env.t, snapm1.WaitSnapshotLoadRequestCount(2, 10*time.Millisecond, 100)) // To allow snapshot manager to receive load new state snapshot request
env.sendTimerTickToNodes(100 * time.Millisecond) // To check the response from snapshot manager about loaded new state snapshot; timer tick is not necessary: any input would be suitable
require.True(env.t, snapm1.WaitSnapshotLoadedCount(2, 10*time.Millisecond, 100)) // To allow snapshot manager thread to wake up and respond
require.True(env.t, env.ensureCompletedChainFetchStateDiff(responseCh, oldBlocks[branchIndex+1:], newBlocks, 10, 100*time.Millisecond))
}

Expand Down