various improvements to the Synchronized tests
authorAdam Simpkins <simpkins@fb.com>
Wed, 6 Jul 2016 23:21:37 +0000 (16:21 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Wed, 6 Jul 2016 23:25:33 +0000 (16:25 -0700)
commit6b66499c48ba83883c6922326cd5d618e7e3a05d
treed520542dc2c8d0b8f16b7797a84b8696d49e7e9d
parenta2b94586d9000f0b87b9653d237fb5e5960a25be
various improvements to the Synchronized tests

Summary:
Add a runParallel() helper function, to clean up logic that was copy-and-pasted
through most of the test functions.  Additionally, clean up the tests to avoid
unnecessary sleeps.  Also fix backwards arguments to EXPECT_EQ() calls--gtest
assumes the first argument is the expected value, and the second argument is
the value being checked.

Reviewed By: yfeldblum

Differential Revision: D3521565

fbshipit-source-id: e4f007d52c114080cff1fd7a0a407fba39fa8b0e
folly/test/SynchronizedTest.cpp
folly/test/SynchronizedTestLib-inl.h
folly/test/SynchronizedTestLib.h