mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
net: reduce flakyness of tcp test (#20761)
This commit is contained in:
parent
ce7780af69
commit
f603035758
2 changed files with 12 additions and 10 deletions
12
vlib/net/dial_tcp_with_bind_test.v
Normal file
12
vlib/net/dial_tcp_with_bind_test.v
Normal 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)
|
||||
}
|
|
@ -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()!
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue