Skip to content

Commit fb028ab

Browse files
committed
net.unix: make unix_test.v more robust
1 parent fba28d2 commit fb028ab

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vlib/net/unix/unix_test.v

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
import os
12
import net.unix
23

3-
const test_port = 'unix_domain_socket'
4+
const test_port = os.join_path(os.temp_dir(), 'unix_domain_socket')
5+
6+
fn testsuite_begin() {
7+
os.rm(test_port) or { }
8+
}
9+
10+
fn testsuite_end() {
11+
os.rm(test_port) or { }
12+
}
413

514
fn handle_conn(mut c unix.StreamConn) {
615
for {

0 commit comments

Comments
 (0)