net: reduce flakyness of tcp test (#20761)

This commit is contained in:
Delyan Angelov 2024-02-09 11:52:27 +02:00 committed by GitHub
parent ce7780af69
commit f603035758
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 10 deletions

View file

@ -0,0 +1,12 @@
import net
fn test_bind() {
$if !network ? {
return
}
eprintln(@LOCATION)
mut conn := net.dial_tcp_with_bind('vlang.io:80', '0.0.0.0:0')!
dump(conn)
conn.close()!
eprintln(@LOCATION)
}

View file

@ -1,5 +1,3 @@
// vtest flaky: true
// vtest retry: 8
import net
const test_port = 45123
@ -86,11 +84,3 @@ fn test_tcp_unix() {
fn testsuite_end() {
eprintln('\ndone')
}
fn test_bind() {
$if !network ? {
return
}
mut conn := net.dial_tcp_with_bind('vlang.io:80', '127.0.0.1:0')!
conn.close()!
}