/[Apache-SVN]
ViewVC logotype

Revision 1005155


Jump to revision: Previous Next
Author: dreiss
Date: Wed Oct 6 17:10:31 2010 UTC (14 years, 1 month ago)
Changed paths: 1
Log Message:
THRIFT-926. cpp: TFileTransportTest timing slightly more lenient

Several of the TFileTransportTest tests check wall clock time to make
sure the writer thread processes operations quickly enough, and isn't
hanging.  However, this can easily result in false failures if we don't
get enough processor time.  This commit makes a few changes to reduce
the number of these failures.

- No longer fail if a single destructor call takes more than 500us.
  We only require 90% of the calls to complete in 500us.  No call may
  take more than 100ms, though.  With this change, the test passes most
  of the time now, even while an "fbmake opt" task is running in
  parallel.

- In the flush_max_us tests, make sure the writer thread is started
  before we start recording timing.  Otherwise, creating the thread
  could take long enough to throw off the numbers for the first fsync()
  call.

Also tested with the pthread_cond_signal() in the TFileTransport
destructor commented out, to make sure the test still fails properly
when the destructor takes too long.

Changed paths

Path Details
Directoryincubator/thrift/trunk/lib/cpp/test/TFileTransportTest.cpp modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26