mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix websocket_test.v after a7ae3bf
This commit is contained in:
parent
12ec0e9fe1
commit
cf47a5f978
@ -27,7 +27,7 @@ fn test_ws_ipv6() {
|
|||||||
}
|
}
|
||||||
spawn start_server(.ip6, 30001)
|
spawn start_server(.ip6, 30001)
|
||||||
time.sleep(1500 * time.millisecond)
|
time.sleep(1500 * time.millisecond)
|
||||||
ws_test(.ip6, 'ws://localhost:${port}') or {
|
ws_test(.ip6, 'ws://localhost:30001') or {
|
||||||
eprintln('> error while connecting .ip6, err: ${err}')
|
eprintln('> error while connecting .ip6, err: ${err}')
|
||||||
assert false
|
assert false
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ fn test_ws_ipv4() {
|
|||||||
}
|
}
|
||||||
spawn start_server(.ip, 30002)
|
spawn start_server(.ip, 30002)
|
||||||
time.sleep(1500 * time.millisecond)
|
time.sleep(1500 * time.millisecond)
|
||||||
ws_test(.ip, 'ws://localhost:${port}') or {
|
ws_test(.ip, 'ws://localhost:30002') or {
|
||||||
eprintln('> error while connecting .ip, err: ${err}')
|
eprintln('> error while connecting .ip, err: ${err}')
|
||||||
assert false
|
assert false
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ fn test_on_close_when_server_closing_connection() ! {
|
|||||||
}, test_results)
|
}, test_results)
|
||||||
spawn ws.listen()
|
spawn ws.listen()
|
||||||
|
|
||||||
mut client := websocket.new_client('ws://localhost:${port}')!
|
mut client := websocket.new_client('ws://localhost:30003')!
|
||||||
|
|
||||||
client.connect()!
|
client.connect()!
|
||||||
spawn client.listen()
|
spawn client.listen()
|
||||||
@ -156,7 +156,7 @@ fn test_on_close_when_client_closing_connection() ! {
|
|||||||
mut ws := websocket.new_server(.ip, 30004, '')
|
mut ws := websocket.new_server(.ip, 30004, '')
|
||||||
spawn ws.listen()
|
spawn ws.listen()
|
||||||
|
|
||||||
mut client := websocket.new_client('ws://localhost:${port}')!
|
mut client := websocket.new_client('ws://localhost:30004')!
|
||||||
|
|
||||||
mut test_results := WebsocketTestResults{}
|
mut test_results := WebsocketTestResults{}
|
||||||
client.on_close_ref(fn (mut cli websocket.Client, code int, reason string, mut res WebsocketTestResults) ! {
|
client.on_close_ref(fn (mut cli websocket.Client, code int, reason string, mut res WebsocketTestResults) ! {
|
||||||
|
Loading…
Reference in New Issue
Block a user