Skip to content

Commit 4b03c33

Browse files
committed
ci: reduce the chances of false positives due to hangs of use_net_and_net_unix_together_test.v on windows
1 parent d0dc13e commit 4b03c33

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎vlib/net/unix/use_net_and_net_unix_together_test.v‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
// vtest retry: 3
12
import os
3+
import time
24
import net.unix
35
import net as _
46

@@ -7,6 +9,13 @@ const test_port = os.join_path(tfolder, 'domain_socket')
79

810
fn testsuite_begin() {
911
os.mkdir_all(tfolder) or {}
12+
spawn fn () {
13+
// Normally this entire test should take less than a second,
14+
// but sometimes it hangs on windows for hours. Instead of skipping it entirely,
15+
// ensure the test will die, and later the test framework can restart it.
16+
time.sleep(5 * time.second)
17+
exit(1)
18+
}()
1019
}
1120

1221
fn testsuite_end() {

0 commit comments

Comments
 (0)