[Box Backup-commit] [boxbackup/boxbackup] a70ef1: Reduce precision of common timer test

GitHub noreply at github.com
Tue Jun 20 21:09:15 BST 2017

  Branch: refs/heads/update_windows_unibuild_2
  Home:   https://github.com/boxbackup/boxbackup
  Commit: a70ef1e3083e901aef23b11bc4e443e8eabaf9f8
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
    M lib/common/Logging.h
    M test/common/testcommon.cpp

  Log Message:
  Reduce precision of common timer test

Ideally timers would be perfectly accurate and we could sleep for 1.0 seconds,
but on OSX in particular they could fire 50-100 ms late (I've seen 4 ms in
practice) and we don't want the tests to fail because of this, because we don't
really need that kind of precision in practice. So we reduce the timer
intervals by 100ms to be safe.

Increase logging level and add timestamps in testcommon.  Should help to debug
frequent test failures such as Condition [t2.HasExpired()] on OSX hosts on

Add a SettingsGuard to the Console logger for its specific settings, such as
showing times and microseconds.

(cherry picked from commit a5e6cff1d435329b0121417ed9509e315ce0edd5)
(cherry picked from commit 8d02eebce553ed822e0fcd60d6e319384e15ba4b)

More information about the Boxbackup-commit mailing list