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: Replace timer with counter loop in TestNodeTxHandlerRestart #5533

Conversation

algonautshant
Copy link
Contributor

Enhance the wait for catchpoint by looping instead of the timer to avoid timer runout without looping under stressed environments.

@algonautshant algonautshant changed the title Replace timer with counter loop in TestNodeTxHandlerRestart test: Replace timer with counter loop in TestNodeTxHandlerRestart Jul 7, 2023
@algonautshant algonautshant self-assigned this Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #5533 (9b18258) into master (3e80027) will increase coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5533      +/-   ##
==========================================
+ Coverage   55.78%   55.86%   +0.07%     
==========================================
  Files         446      446              
  Lines       63262    63262              
==========================================
+ Hits        35293    35343      +50     
+ Misses      25590    25553      -37     
+ Partials     2379     2366      -13     

see 17 files with indirect coverage changes

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

Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

Could you also log how many iterations it took?

@algonautshant
Copy link
Contributor Author

Could you also log how many iterations it took?

When if fails, it is the full 1000 iterations, so no need to report.
When in passes, we don't log/report anything. Do you want to?

@algorandskiy
Copy link
Contributor

Yes, I'd like to see if have it logged if it was stuck in the loop for more than 10 sec (40 iterations looks like).

Copy link

@ASISBusiness ASISBusiness left a comment

Choose a reason for hiding this comment

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

Working

@winder
Copy link
Contributor

winder commented Jul 10, 2023

If this is more about time than the number of attempts, require.Eventually can manage the loop / duration automatically:
https://github.com/stretchr/testify/blob/v1.8.4/assert/assertions.go#L1833

@algorandskiy algorandskiy merged commit 4251297 into algorand:master Jul 10, 2023
9 checks passed
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.

None yet

5 participants