Skip to content

Make test output deterministic #641

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

Conversation

jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Jun 18, 2020

Tests use sources of randomness to produce seeds, preimages, secrets,
and ephemeral data. However, this makes comparing logs between different
test runs difficult. Remove uses of random number generators and the
current time in favor of fixed values in order to make the test output
deterministic.

Tests use sources of randomness to produce seeds, preimages, secrets,
and ephemeral data. However, this makes comparing logs between different
test runs difficult. Remove uses of random number generators and the
current time in favor of fixed values in order to make the test output
deterministic.
@jkczyz jkczyz force-pushed the 2020-06-deterministic-test-logging branch from fe674a8 to 43eed8d Compare June 19, 2020 02:29
@codecov
Copy link

codecov bot commented Jun 19, 2020

Codecov Report

Merging #641 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #641      +/-   ##
==========================================
+ Coverage   91.28%   91.30%   +0.02%     
==========================================
  Files          35       35              
  Lines       21138    21104      -34     
==========================================
- Hits        19296    19270      -26     
+ Misses       1842     1834       -8     
Impacted Files Coverage Δ
lightning/src/lib.rs 100.00% <ø> (ø)
lightning/src/ln/channel.rs 86.78% <100.00%> (-0.03%) ⬇️
lightning/src/ln/channelmonitor.rs 95.70% <100.00%> (-0.02%) ⬇️
lightning/src/ln/functional_test_utils.rs 94.66% <100.00%> (-0.02%) ⬇️
lightning/src/ln/functional_tests.rs 97.29% <100.00%> (+0.17%) ⬆️
lightning/src/ln/peer_handler.rs 54.74% <100.00%> (-0.26%) ⬇️
lightning/src/util/test_utils.rs 85.20% <100.00%> (ø)
lightning/src/util/ser_macros.rs 96.59% <0.00%> (-0.69%) ⬇️
lightning/src/util/ser.rs 87.45% <0.00%> (-0.33%) ⬇️
... and 1 more

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 bd2fa43...43eed8d. Read the comment docs.

Copy link
Contributor

@arik-so arik-so left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@TheBlueMatt TheBlueMatt merged commit 70fca07 into lightningdevkit:master Jun 21, 2020
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.

3 participants