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