net.unix: make unix_test.v more robust

pull/8906/head
Delyan Angelov 2021-02-22 17:48:31 +02:00
parent fba28d2dcc
commit fb028abc71
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 10 additions and 1 deletions

View File

@ -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 {