Expecting googlemock calls from another thread
What will be the best way to write (google) test cases using a google mock object and expect the EXPECT_CALL() definitions being called from another thread controlled by the class in test? Simply calling sleep() or alike after triggering the call sequences doesn't feel appropriate since it may slow down testing unnecessary and may not really hit the timing conditions. But finishing the test case somehow has to wait until the mock methods have been called. Ideas anyone? Here's some code to illustrate the situation: Bar.hpp (the class under test) class Bar { public: Bar(IFooInterface*