Skip to content

Commit

Permalink
util: remove outdated flightcontrol test assertion.
Browse files Browse the repository at this point in the history
The test was making an assertion that is no longer expected to always be
true after moby#2195, which purposely made flightcontrol less deterministic.
This lead to occasional failures.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
  • Loading branch information
sipsma committed Jul 22, 2021
1 parent e6daa91 commit febcbb7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions util/flightcontrol/flightcontrol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,11 @@ func TestCancelBoth(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, ret1, "bar")

f2 := testFunc(100*time.Millisecond, "baz", &counter)
ret1, err = g.Do(context.TODO(), "foo", f2)
assert.NoError(t, err)
assert.Equal(t, ret1, "baz")
ret1, err = g.Do(context.TODO(), "abc", f)
assert.NoError(t, err)
assert.Equal(t, ret1, "bar")

assert.Equal(t, counter, int64(4))
assert.Equal(t, counter, int64(3))
}

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

0 comments on commit febcbb7

Please sign in to comment.