1
0
mirror of https://github.com/golang/go synced 2024-11-25 08:07:57 -07:00

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.
This commit is contained in:
Nevkontakte 2022-03-20 16:50:23 +00:00
parent 6673d5d701
commit 95f576e803
2 changed files with 4 additions and 4 deletions

View File

@ -2587,8 +2587,8 @@ func TestClientHandshakeContextCancellation(t *testing.T) {
if err != context.Canceled { if err != context.Canceled {
t.Errorf("Unexpected client handshake error: %v", err) t.Errorf("Unexpected client handshake error: %v", err)
} }
if runtime.GOARCH == "wasm" { if runtime.GOOS == "js" {
t.Skip("conn.Close does not error as expected when called multiple times on WASM") t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js")
} }
err = cli.Close() err = cli.Close()
if err == nil { if err == nil {

View File

@ -1967,8 +1967,8 @@ func TestServerHandshakeContextCancellation(t *testing.T) {
if err != context.Canceled { if err != context.Canceled {
t.Errorf("Unexpected server handshake error: %v", err) t.Errorf("Unexpected server handshake error: %v", err)
} }
if runtime.GOARCH == "wasm" { if runtime.GOOS == "js" {
t.Skip("conn.Close does not error as expected when called multiple times on WASM") t.Skip("conn.Close does not error as expected when called multiple times on GOOS=js")
} }
err = conn.Close() err = conn.Close()
if err == nil { if err == nil {