Opens a client connection and issues a request. The reply must be exactly what was sent.
Makes a test. Starts the client in its own process, then starts the server in the current process and waits for them to finish. The client sends a message, gets an answer, compares the two strings and exits. The server opens the socket, accepts one request, reads the message, replies with the same message and exits (no more requests are handled).
Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).
Copyright (c) 2016-2017 dunnhumby Germany GmbH. All rights reserved.
Test-suite for UnixSockets.
The tests involve unix sockets and forking processes.
FLAKY: the unittests in this module are very flaky, as they rely on making various system calls (fork(), waitpid(), epoll_wait(), epoll_ctl(), etc) which could, under certain environmental conditions, fail.