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

[Merged by Bors] - Fix logging issues in TestSpacemeshApp_NodeService #4763

Closed
wants to merge 1 commit into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Aug 1, 2023

Motivation

TestSpacemeshApp_NodeService has been flaky recently. The issues were caused by how libp2p does logging and a missing cleanup of the internal clock during the test.

Changes

  • remove custom clock in test - it is overwritten anyway by calling app.Start() later in the test
  • ensure the global logger used by libp2p is set to a no-op logger when the node is shut down (via p2p.Host::Stop())

Test Plan

n/a

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed

DevOps Notes

  • This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
  • This PR does not affect public APIs
  • This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
  • This PR does not make changes to log messages (which monitoring infrastructure may rely on)

@fasmat fasmat self-assigned this Aug 1, 2023
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #4763 (df19596) into develop (c3b7250) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           develop   #4763     +/-   ##
=========================================
- Coverage     76.8%   76.8%   -0.1%     
=========================================
  Files          259     259             
  Lines        29431   29432      +1     
=========================================
- Hits         22623   22619      -4     
- Misses        5372    5377      +5     
  Partials      1436    1436             
Files Changed Coverage Δ
p2p/upgrade.go 68.5% <100.0%> (+0.2%) ⬆️

... and 2 files with indirect coverage changes

@fasmat
Copy link
Member Author

fasmat commented Aug 1, 2023

bors merge

bors bot pushed a commit that referenced this pull request Aug 1, 2023
## Motivation
`TestSpacemeshApp_NodeService` has been flaky recently. The issues were caused by how libp2p does logging and a missing cleanup of the internal clock during the test.

## Changes
- remove custom clock in test - it is overwritten anyway by calling `app.Start()` later in the test
- ensure the global logger used by libp2p is set to a no-op logger when the node is shut down (via `p2p.Host::Stop()`)

## Test Plan
n/a

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed

## DevOps Notes
<!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases -->
- [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
- [x] This PR does not affect public APIs
- [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
- [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
@bors
Copy link

bors bot commented Aug 1, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title Fix logging issues in TestSpacemeshApp_NodeService [Merged by Bors] - Fix logging issues in TestSpacemeshApp_NodeService Aug 1, 2023
@bors bors bot closed this Aug 1, 2023
@bors bors bot deleted the fix-logging-tests branch August 1, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants