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] tests: Fix time tracking in process_events #3041

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Sometimes tests seemingly deadlock but in reality it they spin (really sleep) in WidgetTest.process_events way past the real timeout (due to improper time keeping).

Description of changes

Use time.perf_counter not time.clock. clock is deprecated and platform dependent, but mostly does not measure time
spent in sleep.

Includes
  • Code changes
  • Tests
  • Documentation

Use `perf_counter` (wall time) not `clock` (CPU time). `clock` is
deprecated and platform dependent, but mostly does not measure time
spent in sleep.
@codecov-io
Copy link

Codecov Report

Merging #3041 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #3041   +/-   ##
=======================================
  Coverage   82.31%   82.31%           
=======================================
  Files         335      335           
  Lines       57758    57758           
=======================================
  Hits        47541    47541           
  Misses      10217    10217

@astaric astaric merged commit 1289011 into biolab:master May 25, 2018
@ales-erjavec ales-erjavec deleted the fixes/tests-process-events-wall-time branch May 29, 2018 07:10
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