Problem: tests use same IPC endpoint

Solution: use either a wildcard IPC, or where the codepath needs to
be tested a file named after the test, so that it is unique and there
is no clash on the filesystem, allowing parallel test runs.
This commit is contained in:
Luca Boccassi
2017-05-01 12:23:19 +01:00
parent 5934919f3e
commit b29d46b6a5
3 changed files with 21 additions and 17 deletions

View File

@@ -37,12 +37,12 @@ int main (void)
void *sb = zmq_socket (ctx, ZMQ_PAIR);
assert (sb);
int rc = zmq_bind (sb, "ipc:///tmp/tester");
int rc = zmq_bind (sb, "ipc:///tmp/test_pair_ipc");
assert (rc == 0);
void *sc = zmq_socket (ctx, ZMQ_PAIR);
assert (sc);
rc = zmq_connect (sc, "ipc:///tmp/tester");
rc = zmq_connect (sc, "ipc:///tmp/test_pair_ipc");
assert (rc == 0);
bounce (sb, sc);