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

Use test clock in run_auto_test tests and dht test #1095

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

zugz
Copy link

@zugz zugz commented Aug 17, 2018

This lets us test behaviours which involve timeouts without actually waiting
for the timeout to occur in realtime.

Based on #1038.

(This PR converts a few of the tests to use this facility; handling the
remainder is left to future work.)


This change is Reviewable

@zugz zugz force-pushed the customClock branch 4 times, most recently from 69bf11e to c29179d Compare August 18, 2018 12:24
@iphydf iphydf added this to the v0.2.x milestone Aug 18, 2018
@iphydf
Copy link
Member

iphydf commented Aug 18, 2018

Looks good. Can you make the first commit ("make mono_time an argument") a separate PR?

@iphydf iphydf changed the title add facility to use a custom clock in tests Add facility to use a custom clock in tests. Aug 19, 2018
@iphydf
Copy link
Member

iphydf commented Aug 21, 2018

Can you also make the "rename monotime to mono_time" a separate PR?

@TokTok TokTok deleted a comment from CLAassistant Aug 26, 2018
@zugz zugz changed the title Add facility to use a custom clock in tests. Use test clock in run_auto_test tests and dht test Aug 30, 2018
@zugz zugz force-pushed the customClock branch 2 times, most recently from 1779481 to a68d023 Compare August 30, 2018 18:43
Copy link
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r1.
Reviewable status: 0 of 1 approvals obtained

@codecov
Copy link

codecov bot commented Aug 31, 2018

Codecov Report

Merging #1095 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1095     +/-   ##
========================================
+ Coverage    82.6%     83%   +0.3%     
========================================
  Files          82      82             
  Lines       14478   14473      -5     
========================================
+ Hits        11970   12014     +44     
+ Misses       2508    2459     -49
Impacted Files Coverage Δ
auto_tests/overflow_sendq_test.c 100% <ø> (ø) ⬆️
auto_tests/friend_connection_test.c 100% <ø> (ø) ⬆️
auto_tests/run_auto_test.h 100% <100%> (ø) ⬆️
auto_tests/reconnect_test.c 100% <100%> (ø) ⬆️
auto_tests/overflow_recvq_test.c 100% <100%> (ø) ⬆️
auto_tests/send_message_test.c 94.1% <100%> (-0.7%) ⬇️
auto_tests/conference_peer_nick_test.c 100% <100%> (ø) ⬆️
auto_tests/dht_test.c 47.8% <100%> (+0.7%) ⬆️
auto_tests/conference_double_invite_test.c 100% <100%> (ø) ⬆️
auto_tests/lossy_packet_test.c 100% <100%> (ø) ⬆️
... and 13 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 2e4cae6...9764285. Read the comment docs.

@zugz zugz merged commit 9764285 into TokTok:master Aug 31, 2018
@zugz zugz deleted the customClock branch August 31, 2018 16:24
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.8 Oct 7, 2018
This pull request was closed.
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