Skip to content

Commit 8df42f4

Browse files
committed
jsonrpc2: fix 'call to (*T).Fatalf from a non-test goroutine' vet error
1 parent a76bdec commit 8df42f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jsonrpc2_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ func run(ctx context.Context, t *testing.T, r io.ReadCloser, w io.WriteCloser) *
8484
}()
8585

8686
if err := conn.Run(ctx); err != nil {
87-
t.Fatalf("Stream failed: %v", err)
87+
t.Errorf("Stream failed: %v", err)
8888
}
8989
}()
9090

91+
if t.Failed() {
92+
t.FailNow()
93+
}
94+
9195
return conn
9296
}
9397

0 commit comments

Comments
 (0)