Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ChannelIsEmpty (0.43 sec)

  1. pilot/pkg/config/kube/gateway/deploymentcontroller_test.go

    	expectReconciled()
    	assert.ChannelIsEmpty(t, writes)
    	// Test fake doesn't actual do Apply, so manually do this
    	defaultGateway.Annotations = map[string]string{ControllerVersionAnnotation: fmt.Sprint(ControllerVersion)}
    	gws.Update(defaultGateway)
    	expectReconciled()
    	// We shouldn't write in response to our write.
    	assert.ChannelIsEmpty(t, writes)
    
    	defaultGateway.Annotations["foo"] = "bar"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 21:43:20 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  2. pkg/test/util/assert/assert.go

    	case r := <-c:
    		return r
    	case <-time.After(time.Second * 5):
    		t.Fatalf("failed to receive event after 5s")
    	}
    	// Not reachable
    	return ptr.Empty[T]()
    }
    
    // ChannelIsEmpty asserts a channel is empty for at least 20ms
    func ChannelIsEmpty[T any](t test.Failer, c <-chan T) {
    	t.Helper()
    	select {
    	case r := <-c:
    		t.Fatalf("channel had element, expected empty: %v", r)
    	case <-time.After(time.Millisecond * 20):
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 18 17:21:50 UTC 2023
    - 4.4K bytes
    - Viewed (0)
Back to top