Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for failAfter (0.04 sec)

  1. 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)
  2. istioctl/pkg/multicluster/remote_secret_test.go

    	}
    	return out
    }
    
    type fakeOutputWriter struct {
    	b           bytes.Buffer
    	injectError error
    	failAfter   int
    }
    
    func (w *fakeOutputWriter) Write(p []byte) (n int, err error) {
    	w.failAfter--
    	if w.failAfter <= 0 && w.injectError != nil {
    		return 0, w.injectError
    	}
    	return w.b.Write(p)
    }
    func (w *fakeOutputWriter) String() string { return w.b.String() }
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 24 17:36:49 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  3. 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)
  4. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

       * even permanently blocked.
       */
      public void testListenerDeadlock() throws InterruptedException {
        final CountDownLatch failEnter = new CountDownLatch(1);
        final CountDownLatch failLeave = new CountDownLatch(1);
        final CountDownLatch afterStarted = new CountDownLatch(1);
        Service failRunService =
            new AbstractService() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top