Tests: Try to remove old test sockets in TestLibCoreStream
If an error occurred during a previous test run, the file might be lying around still. This should clear up CI failures happening on macOS at the moment.
This commit is contained in:
parent
8c96f7b3aa
commit
2d4a976616
1 changed files with 5 additions and 0 deletions
|
|
@ -343,6 +343,8 @@ TEST_CASE(local_socket_read)
|
|||
Core::EventLoop event_loop;
|
||||
|
||||
auto socket_path = ByteString::formatted("{}/{}", Core::StandardPaths::tempfile_directory(), "test-socket"sv);
|
||||
if (!Core::System::stat(socket_path).is_error())
|
||||
TRY_OR_FAIL(Core::System::unlink(socket_path));
|
||||
|
||||
auto local_server = Core::LocalServer::construct();
|
||||
EXPECT(local_server->listen(socket_path));
|
||||
|
|
@ -391,6 +393,9 @@ TEST_CASE(local_socket_write)
|
|||
Core::EventLoop event_loop;
|
||||
|
||||
auto socket_path = ByteString::formatted("{}/{}", Core::StandardPaths::tempfile_directory(), "test-socket"sv);
|
||||
if (!Core::System::stat(socket_path).is_error())
|
||||
TRY_OR_FAIL(Core::System::unlink(socket_path));
|
||||
|
||||
auto local_server = Core::LocalServer::construct();
|
||||
EXPECT(local_server->listen(socket_path));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue