aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-02-20 23:15:18 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-02-20 23:15:18 +0100
commitbdd6a86d7383d75b9d682481e84081ee15e05d06 (patch)
tree4f2eab2a07949858597bb7bf548a088fbb5df646 /tests
parent1ab3ec57319461fda8ec8ec40c7ad3a905e9f3cf (diff)
Remove flaky test
It wasn't testing the right thing in the previous iteration. And in this iteration the behaviour is a timeout on Unix, and nothing on Windows.
Diffstat (limited to 'tests')
-rw-r--r--tests/core/net/test_core_net.odin23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/core/net/test_core_net.odin b/tests/core/net/test_core_net.odin
index 32c8650c6..167b7e82a 100644
--- a/tests/core/net/test_core_net.odin
+++ b/tests/core/net/test_core_net.odin
@@ -340,8 +340,6 @@ tcp_tests :: proc(t: ^testing.T) {
two_servers_binding_same_endpoint(t)
fmt.println("Testing client connecting to a closed port...")
client_connects_to_closed_port(t)
- fmt.println("Testing client connecting to port that doesn't accept...")
- client_connects_to_open_but_non_accepting_port(t)
fmt.println("Testing client sending server data...")
client_sends_server_data(t)
}
@@ -370,27 +368,6 @@ client_connects_to_closed_port :: proc(t: ^testing.T) {
}
@(test)
-client_connects_to_open_but_non_accepting_port :: proc(t: ^testing.T) {
- s_skt, s_err := net.listen_tcp(ENDPOINT)
- expect(t, s_err == nil, "expected listening to succeed")
- defer net.close(s_skt)
-
- c_skt, c_err := net.dial_tcp(ENDPOINT)
- expect(t, c_err == nil, "expected dial to succeed")
- defer net.close(c_skt)
-
- net.set_option(c_skt, .Send_Timeout, time.Millisecond * 10)
-
- // NOTE: Have to send a bunch of data so the kernel buffer fills up and it requires writing to the socket.
- buf, alloc_err := make([]byte, mem.Gigabyte)
- defer delete(buf)
- expect(t, alloc_err == nil, "expected to be able to allocate a gigabyte to fill the send buffer")
-
- _, send_err := net.send(c_skt, buf)
- expect(t, send_err == net.TCP_Send_Error.Timeout, fmt.tprintf("expected sending to non-accepting socket to timeout, got %v", send_err))
-}
-
-@(test)
client_sends_server_data :: proc(t: ^testing.T) {
CONTENT: string: "Hellope!"