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:
Claude
2026-11-03 14:16:33 +00:00
committed by Dennis Klein
parent 0367c2a4a8
commit 3c752937a4
6 changed files with 70 additions and 60 deletions

View File

@@ -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