mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
test: use unique ipc addresses that the tests remove
- the in-process tests used fixed, relative ipc addresses; the socket files stayed in the build directory (99 files after 6 runs), and two runs of the same test at the same time could share a socket - use test::IpcAddress: a unique path in /tmp that the destructor removes - drop the session suffix of the inproc addresses: an inproc address is local to the process Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,10 +69,10 @@ auto RunTransferTimeout(string transport) -> void
|
||||
exit(res.exit_code);
|
||||
}
|
||||
|
||||
void InterruptTransfer(const string& transport, const string& _address)
|
||||
void InterruptTransfer(const string& transport, const string& name)
|
||||
{
|
||||
size_t session{UuidHash()};
|
||||
std::string address(ToString(_address, "_", transport));
|
||||
test::IpcAddress const address(ToString(name, "_", transport));
|
||||
|
||||
fair::mq::ProgOptions config;
|
||||
test::Configure(config, to_string(session));
|
||||
@@ -103,12 +103,12 @@ TEST(TransferTimeout, shmem)
|
||||
|
||||
TEST(InterruptTransfer, zeromq)
|
||||
{
|
||||
InterruptTransfer("zeromq", "ipc://test_interrupt_transfer");
|
||||
InterruptTransfer("zeromq", "interrupt_transfer");
|
||||
}
|
||||
|
||||
TEST(InterruptTransfer, shmem)
|
||||
{
|
||||
InterruptTransfer("shmem", "ipc://test_interrupt_transfer");
|
||||
InterruptTransfer("shmem", "interrupt_transfer");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user