MCPcopy Index your code
hub / github.com/expr-lang/expr / TestEventuallyTimeout

Function TestEventuallyTimeout

internal/testify/assert/assertions_test.go:2876–2895  ·  view source on GitHub ↗

Check that a long running condition doesn't block Eventually. See issue 805 (and its long tail of following issues)

(t *testing.T)

Source from the content-addressed store, hash-verified

2874// Check that a long running condition doesn't block Eventually.
2875// See issue 805 (and its long tail of following issues)
2876func TestEventuallyTimeout(t *testing.T) {
2877 mockT := new(testing.T)
2878
2879 NotPanics(t, func() {
2880 done, done2 := make(chan struct{}), make(chan struct{})
2881
2882 // A condition function that returns after the Eventually timeout
2883 condition := func() bool {
2884 // Wait until Eventually times out and terminates
2885 <-done
2886 close(done2)
2887 return true
2888 }
2889
2890 False(t, Eventually(mockT, condition, time.Millisecond, time.Microsecond))
2891
2892 close(done)
2893 <-done2
2894 })
2895}
2896
2897func Test_validateEqualArgs(t *testing.T) {
2898 if validateEqualArgs(func() {}, func() {}) == nil {

Callers

nothing calls this directly

Calls 3

NotPanicsFunction · 0.70
FalseFunction · 0.70
EventuallyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…