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

Attempt to fix the occasionally failing test_02_get_count #1321

Merged
merged 1 commit into from Nov 26, 2018

Conversation

Projects
None yet
2 participants
@fredreichbier
Member

fredreichbier commented Nov 26, 2018

test_02_get_count in the audit tests writes entries to the audit log, sleeps a bit, writes more entries, reads them back and checks that the results match the expectations. On Travis, some of these calls sometimes take a bit too long to execute, which causes the test to fail. This is annoying, because it makes the PR unit tests fail :-)

This PR uses mocks to "freeze" time, so these errors shouldn't occur anymore.

Merging #1321 into master will not change coverage.
The diff coverage is n/a.
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1321   +/-   ##
=======================================
Coverage   96.02%   96.02%
=======================================
Files         141      141
Lines       17156    17156
=======================================
Hits        16474    16474
Misses        682      682

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 08f7ac2...07f3a02. Read the comment docs.

  • Very sophisticated. I would have just changed the test :-)
    Looks good.

  

@fredreichbier fredreichbier requested a review from privacyidea/core Nov 26, 2018

@codecov

This comment has been minimized.

codecov bot commented Nov 26, 2018

Codecov Report

Merging #1321 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1321   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files         141      141           
  Lines       17156    17156           
=======================================
  Hits        16474    16474           
  Misses        682      682

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 08f7ac2...07f3a02. Read the comment docs.

@plettich

This comment has been minimized.

Contributor

plettich commented Nov 26, 2018

Very sophisticated. I would have just changed the test :-)
Looks good.

@plettich plettich merged commit d5559dd into master Nov 26, 2018

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 08f7ac2...07f3a02
Details
codecov/project 96.02% remains the same compared to 08f7ac2
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@plettich plettich deleted the fix-unit-tests branch Nov 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment