From 95f576e80376f345914398ffd739f624fc6e436f Mon Sep 17 00:00:00 2001 From: Nevkontakte Date: Sun, 20 Mar 2022 16:50:23 +0000 Subject: [PATCH] Change test skip condition from GOARCH to GOOS. This allows to skip the last part of the test under GopherJS as well as WebAssembly, since GopherJS shares GOOS=js with wasm. --- src/crypto/tls/handshake_client_test.go | 4 ++-- src/crypto/tls/handshake_server_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crypto/tls/handshake_client_test.go b/src/crypto/tls/handshake_client_test.go index 0950bb0ac45..3cd72274f6d 100644 --- a/src/crypto/tls/handshake_client_test.go +++ b/src/crypto/tls/handshake_client_test.go @@ -2587,8 +2587,8 @@ func TestClientHandshakeContextCancellation(t *testing.T) { if err != context.Canceled { t.Errorf("Unexpected client handshake error: %v", err) } - if runtime.GOARCH == "wasm" { - t.Skip("conn.Close does not error as expected when called multiple times on WASM") + if runtime.GOOS == "js" { + t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js") } err = cli.Close() if err == nil { diff --git a/src/crypto/tls/handshake_server_test.go b/src/crypto/tls/handshake_server_test.go index 6d2c4056261..44a64d985d1 100644 --- a/src/crypto/tls/handshake_server_test.go +++ b/src/crypto/tls/handshake_server_test.go @@ -1967,8 +1967,8 @@ func TestServerHandshakeContextCancellation(t *testing.T) { if err != context.Canceled { t.Errorf("Unexpected server handshake error: %v", err) } - if runtime.GOARCH == "wasm" { - t.Skip("conn.Close does not error as expected when called multiple times on WASM") + if runtime.GOOS == "js" { + t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js") } err = conn.Close() if err == nil {