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

fix: Some expiry service unit tests failing intermittently #838

Merged

Conversation

DRK3
Copy link
Collaborator

@DRK3 DRK3 commented Oct 25, 2021

Some unit tests for the expiry service code relied on starting the service, waiting a short period of time, and then checking the logs to see if an expected failure message was logged. If a system is running slowly, these failure messages may not get logged in time, resulting in a failure. Now, the test will check the logs a maximum of 20 times (with a delay between each check) before giving up and concluding the test has failed. This allows the tests to pass on slower systems while still running quickly on faster machines.

Signed-off-by: Derek Trider Derek.Trider@securekey.com

@cla-bot cla-bot bot added the cla-signed label Oct 25, 2021
@DRK3 DRK3 force-pushed the FixIntermittentExpiryUnitTestFailures branch from 6cb37d7 to f339af2 Compare October 25, 2021 21:42
Some unit tests for the expiry service code relied on starting the service, waiting a short period of time, and then checking the logs to see if an expected failure message was logged. If a system is running slowly, these failure messages may not get logged in time, resulting in a failure. Now, the test will check the logs a maximum of 20 times (with a delay between each check) before giving up and concluding the test has failed. This allows the tests to pass on slower systems while still running quickly on faster machines.

Signed-off-by: Derek Trider <Derek.Trider@securekey.com>
@DRK3 DRK3 force-pushed the FixIntermittentExpiryUnitTestFailures branch from f339af2 to fd00666 Compare October 25, 2021 21:57
@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #838 (fd00666) into main (0488fa1) will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   89.37%   89.45%   +0.08%     
==========================================
  Files         145      145              
  Lines       12758    12758              
==========================================
+ Hits        11402    11413      +11     
+ Misses        836      827       -9     
+ Partials      520      518       -2     
Impacted Files Coverage Δ
pkg/observer/pubsub.go 97.22% <0.00%> (+2.77%) ⬆️
...pub/service/inbox/httpsubscriber/httpsubscriber.go 100.00% <0.00%> (+9.87%) ⬆️

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 5ca0872...fd00666. Read the comment docs.

@DRK3 DRK3 marked this pull request as ready for review October 25, 2021 22:19
@fqutishat fqutishat merged commit 10cca74 into trustbloc:main Oct 26, 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.

3 participants