Skip to content

Commit

Permalink
Merge pull request #66 from SOF3/aggregator-not-parallel
Browse files Browse the repository at this point in the history
test(aggregator): avoid klog data race in unit tests
  • Loading branch information
SOF3 authored Jan 8, 2025
2 parents cf35382 + f74243a commit 7b17553
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aggregator/aggregator/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ import (
"github.com/kubewharf/podseidon/aggregator/synctime"
)

//nolint:paralleltest // klog InitFlags cannot be called in parallel
func TestReconcileEmpty(t *testing.T) {
t.Parallel()

testReconcile(t, TestCase{
MinAvailable: 5,
MinReadySeconds: 0,
Expand All @@ -72,9 +71,8 @@ func TestReconcileEmpty(t *testing.T) {
})
}

//nolint:paralleltest // klog InitFlags cannot be called in parallel
func TestReconcileAllAvailable(t *testing.T) {
t.Parallel()

testReconcile(t, TestCase{
MinAvailable: 5,
MinReadySeconds: 0,
Expand All @@ -98,9 +96,8 @@ func TestReconcileAllAvailable(t *testing.T) {
})
}

//nolint:paralleltest // klog InitFlags cannot be called in parallel
func TestReconcileSomeReadyButUnavailable(t *testing.T) {
t.Parallel()

testReconcile(t, TestCase{
MinAvailable: 5,
MinReadySeconds: 3,
Expand Down

0 comments on commit 7b17553

Please sign in to comment.