Skip to content

Commit 13c8c28

Browse files
committed
done return was being discarded with _. Fixed to capture done and fail the benchmark if !done, even when err == nil.
1 parent 0f2657e commit 13c8c28

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

deps/github.com/openshift/kubernetes/pkg/registry/rbac/rest/storage_rbac_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ func BenchmarkEnsureRBACPolicy(b *testing.B) {
3535
ClusterRoleBindingsToSplit: bootstrappolicy.ClusterRoleBindingsToSplit(),
3636
}
3737
coreClientSet := fake.NewSimpleClientset()
38-
if _, err := ensureRBACPolicy(context.Background(), policy, coreClientSet); err != nil {
39-
b.Fatalf("ensureRBACPolicy failed: %v", err)
38+
done, err := ensureRBACPolicy(context.Background(), policy, coreClientSet)
39+
if err != nil || !done {
40+
b.Fatalf("ensureRBACPolicy failed or did not complete: done=%v err=%v", done, err)
4041
}
4142
}
4243
}

0 commit comments

Comments
 (0)