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

Test fix: flaky TestStreamVerifierCtxCancelPoolQueue #4980

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

algonautshant
Copy link
Contributor

The test expects to have the stream verifier shut down after the EnqueueBacklog returns an error.
To induce an error from EnqueueBacklog, the tests cancels the task ctx while the task is in the exec pool queue.

However, the task ctx canceled is the same as the stream verifier ctx, and occasionally, the stream verifier shuts down because of the ctx before it gets the change to enqueue the task to EnqueueBacklog. When this happens, the tests fails, because the expected message does not get logged.

To fix this, never shut down the stream verifier ctx, instead, shut down the verification pool ctx to make sure the batch is rejected from the exec pool and not the batch ctx.

…make sure the batch is rejected from the exec pool and not the batch ctx
@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #4980 (b676ef4) into master (a35f4b8) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4980      +/-   ##
==========================================
+ Coverage   53.67%   53.69%   +0.02%     
==========================================
  Files         432      432              
  Lines       54077    54077              
==========================================
+ Hits        29025    29036      +11     
+ Misses      22806    22797       -9     
+ Partials     2246     2244       -2     
Impacted Files Coverage Δ
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
network/wsNetwork.go 64.74% <0.00%> (ø)
catchup/peerSelector.go 100.00% <0.00%> (+1.04%) ⬆️
ledger/blockqueue.go 88.50% <0.00%> (+2.87%) ⬆️
ledger/tracker.go 78.05% <0.00%> (+2.95%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@algorandskiy algorandskiy merged commit 787d386 into algorand:master Jan 9, 2023
winder pushed a commit to winder/go-algorand that referenced this pull request Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants