- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for failAfter (0.05 sec)
-
internal/s3select/jstream/scanner_test.go
i++ } } type mockReader struct { pos int mockData byte failAfter int } func newMockReader(failAfter int, data byte) *mockReader { return &mockReader{0, data, failAfter} } func (r *mockReader) Read(p []byte) (n int, err error) { if r.pos >= r.failAfter { return 0, fmt.Errorf("intentionally unexpected reader error") } r.pos++ p[0] = r.mockData return 1, nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/s3select/jstream/decoder_test.go
} if counter != 0 { t.Fatalf("expected 0 items, got %d", counter) } } func TestDecoderReaderFailure(t *testing.T) { var ( failAfter = 900 mockData = byte('[') ) r := newMockReader(failAfter, mockData) decoder := NewDecoder(r, -1) for mv := range decoder.Stream() { t.Logf("depth=%d offset=%d len=%d (%v)", mv.Depth, mv.Offset, mv.Length, mv.Value) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.6K bytes - Viewed (0)