From fb028abc718b38e35b0cd00eb7a8b4e4c5e8e8d2 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 22 Feb 2021 17:48:31 +0200 Subject: [PATCH] net.unix: make unix_test.v more robust --- vlib/net/unix/unix_test.v | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vlib/net/unix/unix_test.v b/vlib/net/unix/unix_test.v index ec222e61b5..2b5ffce6c6 100644 --- a/vlib/net/unix/unix_test.v +++ b/vlib/net/unix/unix_test.v @@ -1,6 +1,15 @@ +import os import net.unix -const test_port = 'unix_domain_socket' +const test_port = os.join_path(os.temp_dir(), 'unix_domain_socket') + +fn testsuite_begin() { + os.rm(test_port) or { } +} + +fn testsuite_end() { + os.rm(test_port) or { } +} fn handle_conn(mut c unix.StreamConn) { for {