Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Nov 16, 2023
1 parent 904661a commit 859a253
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public class KubernetesCloud extends Cloud implements PodTemplateGroup {
public KubernetesCloud(String name) {
super(name);
setMaxRequestsPerHost(DEFAULT_MAX_REQUESTS_PER_HOST);
setPodLabels(PodLabel.fromMap(DEFAULT_POD_LABELS));
setPodLabels(null);
}

/**
Expand Down Expand Up @@ -466,9 +466,7 @@ public List<PodLabel> getPodLabels() {
@DataBoundSetter
public void setPodLabels(@CheckForNull List<PodLabel> labels) {
this.podLabels = new ArrayList<>();
if (labels != null) {
this.podLabels.addAll(labels);
}
this.podLabels.addAll(labels == null || labels.isEmpty() ? PodLabel.fromMap(DEFAULT_POD_LABELS) : labels);
}

/**
Expand Down Expand Up @@ -999,8 +997,8 @@ private Object readResolve() {
if (waitForPodSec == null) {
waitForPodSec = DEFAULT_WAIT_FOR_POD_SEC;
}
if (podLabels == null && labels != null) {
setPodLabels(PodLabel.fromMap(labels));
if (podLabels == null) {
setPodLabels(labels == null ? null : PodLabel.fromMap(labels));
}
if (containerCap != null && containerCap == 0) {
containerCap = null;
Expand Down

0 comments on commit 859a253

Please sign in to comment.