diff options
Diffstat (limited to 'src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go')
-rw-r--r-- | src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go index ec8f4f54043..a45ac3d2ddf 100644 --- a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go +++ b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/common/json/stream_test.go @@ -11,6 +11,7 @@ package json import ( "bytes" + "github.com/mongodb/mongo-tools/common/testtype" "io/ioutil" "net" "reflect" @@ -42,6 +43,7 @@ false ` func TestEncoder(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) for i := 0; i <= len(streamTest); i++ { var buf bytes.Buffer enc := NewEncoder(&buf) @@ -59,6 +61,7 @@ func TestEncoder(t *testing.T) { } func TestDecoder(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) for i := 0; i <= len(streamTest); i++ { // Use stream without newlines as input, // just to stress the decoder even more. @@ -91,6 +94,7 @@ func TestDecoder(t *testing.T) { } func TestDecoderBuffered(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) r := strings.NewReader(`{"Name": "Gopher"} extra `) var m struct { Name string @@ -127,6 +131,7 @@ func nlines(s string, n int) string { } func TestRawMessage(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) // TODO(rsc): Should not need the * in *RawMessage var data struct { X float64 @@ -152,6 +157,7 @@ func TestRawMessage(t *testing.T) { } func TestNullRawMessage(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) // TODO(rsc): Should not need the * in *RawMessage var data struct { X float64 @@ -182,6 +188,7 @@ var blockingTests = []string{ } func TestBlocking(t *testing.T) { + testtype.SkipUnlessTestType(t, testtype.UnitTestType) for _, enc := range blockingTests { r, w := net.Pipe() go w.Write([]byte(enc)) @@ -198,6 +205,7 @@ func TestBlocking(t *testing.T) { } func BenchmarkEncoderEncode(b *testing.B) { + testtype.SkipUnlessBenchmarkType(b, testtype.UnitTestType) b.ReportAllocs() type T struct { X, Y string |