mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
ginkgo.By
can only be used inside a runnable node
Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
parent
3833695e75
commit
05c513d5bf
@ -16,7 +16,11 @@ limitations under the License.
|
|||||||
|
|
||||||
package chaosmonkey
|
package chaosmonkey
|
||||||
|
|
||||||
import "github.com/onsi/ginkgo/v2"
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/onsi/ginkgo/v2"
|
||||||
|
)
|
||||||
|
|
||||||
// Disruption is the type to construct a Chaosmonkey with; see Do for more information.
|
// Disruption is the type to construct a Chaosmonkey with; see Do for more information.
|
||||||
type Disruption func()
|
type Disruption func()
|
||||||
@ -91,7 +95,7 @@ func (cm *Chaosmonkey) Do() {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
ginkgo.By("Waiting for all async tests to be ready")
|
fmt.Println("Waiting for all async tests to be ready")
|
||||||
for _, sem := range sems {
|
for _, sem := range sems {
|
||||||
// Wait for test to be ready. We have to wait for ready *or done* because a test
|
// Wait for test to be ready. We have to wait for ready *or done* because a test
|
||||||
// may panic before signaling that its ready, and we shouldn't block. Since we
|
// may panic before signaling that its ready, and we shouldn't block. Since we
|
||||||
@ -101,15 +105,15 @@ func (cm *Chaosmonkey) Do() {
|
|||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
close(stopCh)
|
close(stopCh)
|
||||||
ginkgo.By("Waiting for async validations to complete")
|
fmt.Println("Waiting for async validations to complete")
|
||||||
for _, sem := range sems {
|
for _, sem := range sems {
|
||||||
sem.waitForDone()
|
sem.waitForDone()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
ginkgo.By("Starting disruption")
|
fmt.Println("Starting disruption")
|
||||||
cm.disruption()
|
cm.disruption()
|
||||||
ginkgo.By("Disruption complete; stopping async validations")
|
fmt.Println("Disruption complete; stopping async validations")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Semaphore is taken by a Test and provides: Ready(), for the Test to call when it's ready for the
|
// Semaphore is taken by a Test and provides: Ready(), for the Test to call when it's ready for the
|
||||||
|
Loading…
Reference in New Issue
Block a user