Skip to content

Add Integration Test to allow customization of successThreshold and failureThreshold in weblogic server liveness and readiness probe #2527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public class ProbeTuning {
@ApiModelProperty("The number of seconds with no response that indicates a failure.")
private Integer timeoutSeconds;

@ApiModelProperty("Number of times the check is performed before giving up.")
private Integer failureThreshold = 1;

@ApiModelProperty("Minimum number of times the check needs to pass for the probe to be considered successful")
private Integer successThreshold = 1;

public ProbeTuning initialDelaySeconds(Integer initialDelaySeconds) {
this.initialDelaySeconds = initialDelaySeconds;
return this;
Expand Down Expand Up @@ -70,12 +76,32 @@ public void setTimeoutSeconds(Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
}

public Integer getFailureThreshold() {
return failureThreshold;
}

public ProbeTuning failureThreshold(Integer failureThreshold) {
this.failureThreshold = failureThreshold;
return this;
}

public Integer getSuccessThreshold() {
return successThreshold;
}

public ProbeTuning successThreshold(Integer successThreshold) {
this.successThreshold = successThreshold;
return this;
}

@Override
public String toString() {
return new ToStringBuilder(this)
.append("initialDelaySeconds", initialDelaySeconds)
.append("periodSeconds", periodSeconds)
.append("timeoutSeconds", timeoutSeconds)
.append("failureThreshold", failureThreshold)
.append("successThreshold", successThreshold)
.toString();
}

Expand All @@ -93,6 +119,8 @@ public boolean equals(Object other) {
.append(initialDelaySeconds, rhs.initialDelaySeconds)
.append(periodSeconds, rhs.periodSeconds)
.append(timeoutSeconds, rhs.timeoutSeconds)
.append(failureThreshold, rhs.failureThreshold)
.append(successThreshold, rhs.successThreshold)
.isEquals();
}

Expand All @@ -102,6 +130,8 @@ public int hashCode() {
.append(initialDelaySeconds)
.append(periodSeconds)
.append(timeoutSeconds)
.append(failureThreshold)
.append(successThreshold)
.toHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public void setAnnotations(Map<String, String> annotations) {
this.annotations = annotations;
}

public ServerPod livenessProve(ProbeTuning livenessProbe) {
public ServerPod livenessProbe(ProbeTuning livenessProbe) {
this.livenessProbe = livenessProbe;
return this;
}
Expand Down
Loading