diff --git a/p2p/transport/websocket/websocket_test.go b/p2p/transport/websocket/websocket_test.go index 4687e46712..debf7fbbc5 100644 --- a/p2p/transport/websocket/websocket_test.go +++ b/p2p/transport/websocket/websocket_test.go @@ -629,19 +629,19 @@ func TestListenerReusePort(t *testing.T) { connsHandled[temp]++ } /* - For windows and macOS load balancing is not done by kernel as per references below. - For other architectures, behaviour is not known. - For ubuntu load balancing doesn't seem to happen consistently. - In order to not have a flaky test, commenting this additiona check. - Hence, Check for load balancing only for linux based architectures. - Refer https://learn.microsoft.com/en-us/windows/win32/winsock/using-so-reuseaddr-and-so-exclusiveaddruse?redirectedfrom=MSDN for windows - References for MACOS - Ref - (https://stackoverflow.com/questions/41247790/so-reuseport-on-macos-with-libuv) - Ref -(https://github.com/uNetworking/uWebSockets/issues/1194) - if runtime.GOOS == "linux" { - for i := 0; i < 2; i++ { - /*Not checking for equal distribution of connections due to above explanation.*/ - /*require.NotEqualf(t, 0, connsHandled[i], "No connections handled by listener %d", i) + For windows and macOS load balancing is not done by kernel as per references below. + For other architectures, behaviour is not known. + For ubuntu load balancing doesn't seem to happen consistently. + In order to not have a flaky test, commenting this additiona check. + Hence, Check for load balancing only for linux based architectures. + Refer https://learn.microsoft.com/en-us/windows/win32/winsock/using-so-reuseaddr-and-so-exclusiveaddruse?redirectedfrom=MSDN for windows + References for MACOS + Ref - (https://stackoverflow.com/questions/41247790/so-reuseport-on-macos-with-libuv) + Ref -(https://github.com/uNetworking/uWebSockets/issues/1194) + if runtime.GOOS == "linux" { + for i := 0; i < 2; i++ { + /*Not checking for equal distribution of connections due to above explanation.*/ + /*require.NotEqualf(t, 0, connsHandled[i], "No connections handled by listener %d", i) t.Logf("Listener %d handled %d connections.", i, connsHandled[i]) } }