Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve IgnoreNonExistentSegment test (backport #4036) #4057

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion test/blackbox/common/BlackboxTestsTransportSHM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,21 @@ TEST(SHM, IgnoreNonExistentSegment)
reader.wait_discovery();

// Create and quickly destroy several participants in several threads
#ifdef _WIN32
constexpr size_t num_threads = 1;
#else
constexpr size_t num_threads = 10;
#endif // _WIN32
std::vector<std::thread> threads;
for (size_t i = 0; i < 10; i++)
for (size_t i = 0; i < num_threads; i++)
{
threads.push_back(std::thread([]()
{
#ifdef _WIN32
constexpr size_t num_parts = 2;
#else
constexpr size_t num_parts = 10;
#endif // _WIN32
for (size_t i = 0; i < num_parts; ++i)
{
PubSubWriter<Data1mbPubSubType> late_writer(TEST_TOPIC_NAME);
Expand Down
Loading