Skip to content

Commit

Permalink
debug: delete using foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
qwtsc committed Nov 27, 2023
1 parent 08a387a commit 1cc346f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;

import io.fabric8.kubernetes.api.model.DeletionPropagation;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -282,7 +283,7 @@ private void checkComputerConf(Map<String, String> computerConf,

@Override
public boolean cancelJob(String jobId, Map<String, String> params) {
return this.operation.withName(KubeUtil.crName(jobId)).delete();
return this.operation.withName(KubeUtil.crName(jobId)).withPropagationPolicy(DeletionPropagation.FOREGROUND).delete();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public void testJobCancelled() {
jobObserver);

DefaultJobState jobState = new DefaultJobState();
jobState.jobStatus(JobStatus.RUNNING);
jobState.jobStatus(JobStatus.INITIALIZING);
Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
.onJobStateChanged(Mockito.eq(jobState));

Expand Down

0 comments on commit 1cc346f

Please sign in to comment.