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

testing: fix TestLatestSigsFromThisNode #2940

Conversation

algonautshant
Copy link
Contributor

Summary

Timing issues between writing to and reading from the database cause the test to occasionally fail.
Make the test more tolerant to such timing issues by polling.

Test Plan

This is a fix for a test.

Timing issues between writing to and reading from the database cause the test to occasionally fail.
Make the test more tolerant to such timing issues by polling.
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2021

Codecov Report

Merging #2940 (ca0c2e0) into master (e69b10d) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2940      +/-   ##
==========================================
- Coverage   47.33%   47.28%   -0.05%     
==========================================
  Files         355      355              
  Lines       57224    57224              
==========================================
- Hits        27085    27060      -25     
- Misses      27079    27102      +23     
- Partials     3060     3062       +2     
Impacted Files Coverage Δ
network/wsPeer.go 72.14% <0.00%> (-3.07%) ⬇️
ledger/blockqueue.go 82.18% <0.00%> (-2.88%) ⬇️
catchup/service.go 68.57% <0.00%> (-1.56%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
network/wsNetwork.go 60.90% <0.00%> (-0.19%) ⬇️
ledger/acctupdates.go 63.01% <0.00%> (-0.09%) ⬇️
data/transactions/verify/txn.go 44.29% <0.00%> (ø)
cmd/tealdbg/debugger.go 73.86% <0.00%> (+1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e69b10d...ca0c2e0. Read the comment docs.

Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small request, but looks good otherwise.

if len(latestSigs) == len(keys) {
break
}
time.Sleep(256 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather seeing this as an exponential backoff, but it's functionally correct as is.

@tsachiherman tsachiherman changed the title fix TestLatestSigsFromThisNode testing: fix TestLatestSigsFromThisNode Sep 23, 2021
@tsachiherman tsachiherman merged commit ee0a715 into algorand:master Sep 23, 2021
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.

Flaky test: compactcert TestLatestSigsFromThisNode
3 participants