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

tests: dump logs at the end of exit callback #5952

Merged

Conversation

algorandskiy
Copy link
Contributor

Summary

There are some random TestCatchupOverGossip failures like this , and the panic itself is caused by the fact controller's StartAlgod inner goroutine calls asserts after the test itself is terminated. For some reason we do not get any log output in case of panic and my current suggestion it is because of STDOUT buffering and panic just flushes STDERR with its own message.
This PR does not prevent the race itself but makes it much less probable by deferring logs dumping to after asserting.

A proper fix is somewhat complicated because the controller object copying/modifying, and StartAlgod is called on a different object than StopAlgod. I suggest to apply this fast fix to see if it help gathering required info, and implement the controller lifetime refactoring if needed.

Test Plan

This is a test fix.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.75%. Comparing base (13e66ff) to head (9b7b3e6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5952      +/-   ##
==========================================
+ Coverage   55.71%   55.75%   +0.03%     
==========================================
  Files         489      489              
  Lines       68111    68111              
==========================================
+ Hits        37950    37972      +22     
+ Misses      27586    27568      -18     
+ Partials     2575     2571       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gmalouf gmalouf requested a review from jasonpaulos March 21, 2024 18:17
@algorandskiy algorandskiy merged commit d0bf8c6 into algorand:master Mar 21, 2024
19 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.

3 participants