23 #include <gtest/gtest.h> 25 TEST(CrossProcessSync, signalling_the_sync_object_results_in_correct_count)
29 auto service = [&cps]()
31 for (
unsigned int i = 1; i <= 50; i++)
35 return ::testing::Test::HasFailure() ?
39 auto client = [&cps]()
41 std::uint32_t counter = 0;
42 for (
unsigned int i = 1; i <= 50; i++)
45 EXPECT_EQ(i, counter);
48 return ::testing::Test::HasFailure() ?
55 TEST(CrossProcessSync, timed_out_wait_on_sync_object_throws_correct_exception)
TEST(CrossProcessSync, signalling_the_sync_object_results_in_correct_count)
CORE_POSIX_DLL_PUBLIC ForkAndRunResult fork_and_run(const std::function< core::posix::exit::Status()> &service, const std::function< core::posix::exit::Status()> &client)
Forks two processes for both the service and the client.
A cross-process synchronization primitive that supports simple wait-condition-like scenarios...
Special value indicating no bit being set.
void try_signal_ready_for(const std::chrono::milliseconds &duration)
Try to signal the other side that we are ready for at most duration milliseconds. ...
std::uint32_t wait_for_signal_ready_for(const std::chrono::milliseconds &duration)
Wait for the other sides to signal readiness for at most duration milliseconds.
Thrown if any of the *_for functions times out.