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

GitHub noreply at github.com
Tue Jun 20 21:38:59 BST 2017

  Branch: refs/heads/update_windows_unibuild_2
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 8575ae5e0d9bfb45aeab8210187c5ed28e756623
  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)

  Commit: 582e6a05a403f3dd58cc38a58b55d6d04a2a5df3
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
    M lib/common/BoxTime.cpp
    M test/bbackupd/testbbackupd.cpp

  Log Message:
  Increase precision of timing on Windows.

Should hopefully reduce random failures of timing-dependent tests which
rely on subsecond precision for accuracy.

(cherry picked from commit c845b2e39fffeb560983a301d810616a6495469d)

Compare: https://github.com/boxbackup/boxbackup/compare/a22e3746fe3b...582e6a05a403

More information about the Boxbackup-commit mailing list