Skip to content

Commit

Permalink
Revert "Actually fix flaky test"
Browse files Browse the repository at this point in the history
This reverts commit 3997279.
  • Loading branch information
thiagokokada committed Mar 5, 2024
1 parent 1e66e8d commit 98663ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func TestPauseCancel(t *testing.T) {

const timeout = time.Second
// will be cancelled before the timeout
ctx, cancelCtx := context.WithTimeout(context.Background(), timeout/10)
ctx, cancelCtx := context.WithTimeout(context.Background(), timeout/20)
defer cancelCtx()

callbackPreCalled := false
Expand All @@ -120,9 +120,7 @@ func TestPauseCancel(t *testing.T) {
assert.Equal(t, callbackPreCalled, false)
assert.Equal(t, callbackPosCalled, false)
assert.Equal(t, notifier.notificationCount.Load(), 0)
// this may be called or not, because we are using the same ctx for the main
// loop and the pause
assert.GreaterOrEqual(t, notifier.notificationCancelCount.Load(), 0)
assert.Equal(t, notifier.notificationCancelCount.Load(), 0)
}

func TestPauseNilCallbacks(t *testing.T) {
Expand Down

0 comments on commit 98663ef

Please sign in to comment.