Skip to content

Commit

Permalink
Fix address clashes in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rbx authored and dennisklein committed Oct 24, 2023
1 parent b40db42 commit 6122010
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/message/_message.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ auto RunPushPullWithMsgResize(string const & transport, string const & _address,

Channel push{"Push", "push", factory};
Channel pull{"Pull", "pull", factory};
auto const address(tools::ToString(_address, "_", transport));
auto const address(tools::ToString(_address, "_", transport, "_", config.GetProperty<string>("session")));
push.Bind(address);
pull.Connect(address);

Expand Down Expand Up @@ -153,7 +153,7 @@ auto RunPushPullWithAlignment(string const& transport, string const& _address, b

Channel push{"Push", "push", factory};
Channel pull{"Pull", "pull", factory};
auto const address(tools::ToString(_address, "_", transport));
auto const address(tools::ToString(_address, "_", transport, "_", config.GetProperty<string>("session")));
push.Bind(address);
pull.Connect(address);

Expand Down Expand Up @@ -211,7 +211,7 @@ auto EmptyMessage(string const& transport, string const& _address, bool expanded

Channel push{"Push", "push", factory};
Channel pull{"Pull", "pull", factory};
auto const address(tools::ToString(_address, "_", transport));
auto const address(tools::ToString(_address, "_", transport, "_", config.GetProperty<string>("session")));
push.Bind(address);
pull.Connect(address);

Expand Down Expand Up @@ -321,8 +321,8 @@ auto ZeroCopyFromUnmanaged(string const& address, bool expandedShmMetadata = fal
Channel push("Push", "push", factory1);
Channel pull("Pull", "pull", factory2);

push.Bind(address);
pull.Connect(address);
push.Bind(address + "_" + session);
pull.Connect(address + "_" + session);

const size_t offset = 100;
auto msg1(push.NewMessage(region, static_cast<char*>(region->GetData()), msgSize, nullptr));
Expand Down
5 changes: 5 additions & 0 deletions test/protocols/_push_pull_multipart.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ auto RunSingleThreadedMultipart(string transport, string address1, string addres
config.SetProperty<size_t>("shm-metadata-msg-size", 2048);
}

address1 += "_" + config.GetProperty<string>("session");
address2 += "_" + config.GetProperty<string>("session");

auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);

Channel push1("Push1", "push", factory);
Expand Down Expand Up @@ -118,6 +121,8 @@ auto RunMultiThreadedMultipart(string transport, string address1, bool expandedS
config.SetProperty<size_t>("shm-metadata-msg-size", 2048);
}

address1 += "_" + config.GetProperty<string>("session");

auto factory = TransportFactory::CreateTransportFactory(transport, tools::Uuid(), &config);

Channel push1("Push1", "push", factory);
Expand Down

0 comments on commit 6122010

Please sign in to comment.