Skip to content

Commit 47df9b7

Browse files
committed
fix concurrency test in v0.4
1 parent 0d3b539 commit 47df9b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/scheduler/cache/status_updater/concurrency_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ var _ = Describe("Status Updater Concurrency - large scale: increase queue size"
156156
podGroupsFromCluster = append(podGroupsFromCluster, podGroup.DeepCopy())
157157
}
158158

159+
Eventually(func() int {
160+
numberOfPodGroupInFlight := 0
161+
statusUpdater.inFlightPodGroups.Range(func(key any, value any) bool {
162+
numberOfPodGroupInFlight += 1
163+
return true
164+
})
165+
return numberOfPodGroupInFlight
166+
}, time.Second*20, time.Millisecond*50).Should(Equal(0))
167+
159168
statusUpdater.SyncPodGroupsWithPendingUpdates(podGroupsFromCluster)
160169

161170
// check that the pods groups are now not updated anymore

0 commit comments

Comments
 (0)