Skip to content

Commit

Permalink
chore: fix gofmt error
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyaprem committed Aug 17, 2023
1 parent 8840f19 commit f660226
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions p2p/transport/websocket/websocket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
}
Expand Down

0 comments on commit f660226

Please sign in to comment.