Commit f40f45ab authored by Nick Sardo's avatar Nick Sardo

Defer test stop & cleanup

parent 8e07e61a
......@@ -98,14 +98,17 @@ func (cm *chaosmonkey) Do() {
sem.waitForReadyOrDone()
}
defer func() {
close(stopCh)
By("Waiting for async validations to complete")
for _, sem := range sems {
sem.waitForDone()
}
}()
By("Starting disruption")
cm.disruption()
By("Disruption complete; stopping async validations")
close(stopCh)
By("Waiting for async validations to complete")
for _, sem := range sems {
sem.waitForDone()
}
}
// Semaphore is taken by a Test and provides: Ready(), for the Test to call when it's ready for the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment