Fix hotloop around scheduling in lifecycle_test
Lifecycle test had a hotloop, where it would run a never-yielding function while processing was going on elsewhere. This inserts a sleep. A sleep is used rather than a yield to be kind to people's battery life.
This commit is contained in:
@@ -333,6 +333,7 @@ func testTerminalStatePodScenario(ctx context.Context, t *testing.T, s *system,
|
||||
s.start(ctx)
|
||||
|
||||
for s.pc.k8sQ.Len() > 0 {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
|
||||
p2, err := s.client.CoreV1().Pods(testNamespace).Get(p1.Name, metav1.GetOptions{})
|
||||
|
||||
Reference in New Issue
Block a user