Skip to content

Commit

Permalink
Merge pull request #328 from ecordell/e2e-timeout-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie committed Dec 8, 2021
2 parents f94d8a4 + c461906 commit 1845227
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions e2e/newenemy/newenemy_test.go
Expand Up @@ -144,12 +144,9 @@ func TestNoNewEnemy(t *testing.T) {
iterations := int(math.Min(max_iterations, math.Ceil(3*stddev*samplestddev+mean)))

t.Logf("check spicedb is protected after %d attempts", iterations)
// *6 to cover the worst case where all requests are handled by the slow node
checkCtx, checkCancel := context.WithTimeout(ctx, time.Duration(iterations)*(networkDelay+timeDelay)*6)
protected, _ := checkNoNewEnemy(checkCtx, t, protectedSpiceDb, iterations)
protected, _ := checkNoNewEnemy(ctx, t, protectedSpiceDb, iterations)
require.NotNil(protected, "unable to determine if spicedb is protected within the time limit")
require.True(*protected, "protection is enabled, but newenemy detected")
checkCancel()
}

// checkNoNewEnemy returns true if the service is protected, false if it is vulnerable, and nil if we couldn't determine
Expand Down

0 comments on commit 1845227

Please sign in to comment.