zhuqi-lucas commented on code in PR #730:
URL: https://github.com/apache/yunikorn-k8shim/pull/730#discussion_r1501327786
##########
pkg/shim/scheduler_mock_test.go:
##########
@@ -128,6 +128,23 @@ func (fc *MockScheduler) addNode(nodeName string,
nodeLabels map[string]string,
return fc.apiProvider.GetAPIs().SchedulerAPI.UpdateNode(request)
}
+func (fc *MockScheduler) waitApplicationDeleted(t *testing.T, appID string) {
+ deadline := time.Now().Add(10 * time.Second)
+ for {
+ app := fc.context.GetApplication(appID)
+ if app == nil {
+ break
+ }
+ log.Log(log.Test).Info("waiting for app deleted",
+ zap.String("appID", appID))
+ time.Sleep(time.Second)
+ if time.Now().After(deadline) {
+ t.Errorf("application %s is not deleted in given time",
appID)
+ return
+ }
+ }
Review Comment:
Addressed in latest PR, thanks @pbacsko for review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]