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: preserve logs on LibGoalFixture failure #6030

Merged

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Jun 13, 2024

Summary

With extra logging the most recent failure showed node cannot stop properly but by the time of detecting this all data dirs (and logs) are gone since the test itself competed OK.
This PR propagates facts about how a node was terminated (term vs kill) so LibGoalFuxture can know it and preserve node.log for future analysis.
Also added debugging logs into node.Stop since it appears to be blocked by some service, and corrected missing new lines in LibGoalFixture stderr logging.

Test Plan

Tested manually: made algod not reacting to SIGTERM, node controller used SIGKILL. This was logged and data dirs with logs remained preserved.

node/node.go Outdated Show resolved Hide resolved
node/node.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 63.15789% with 14 lines in your changes missing coverage. Please review.

Project coverage is 55.89%. Comparing base (4e116cb) to head (ff456cf).
Report is 1 commits behind head on master.

Files Patch % Lines
netdeploy/network.go 0.00% 9 Missing ⚠️
nodecontrol/algodControl.go 0.00% 3 Missing ⚠️
catchup/catchpointService.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6030      +/-   ##
==========================================
+ Coverage   55.86%   55.89%   +0.03%     
==========================================
  Files         482      482              
  Lines       68475    68508      +33     
==========================================
+ Hits        38253    38294      +41     
+ Misses      27620    27616       -4     
+ Partials     2602     2598       -4     

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

algorandskiy and others added 2 commits June 13, 2024 14:20
Co-authored-by: Gary Malouf <982483+gmalouf@users.noreply.github.com>
@algorandskiy algorandskiy requested a review from gmalouf June 13, 2024 18:27
@cce cce changed the title tests: preserve logs on LibGoalFuxture failure tests: preserve logs on LibGoalFixture failure Jun 13, 2024
@algorandskiy algorandskiy merged commit 95c9c18 into algorand:master Jun 13, 2024
20 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