fix: rollback info changes

pull/1335/head
andrew shan 1 year ago
parent a4b4b504a5
commit 147fd21fcf

@ -63,8 +63,6 @@ public class QuickstartCalleeController {
private boolean ifBadGateway = true; private boolean ifBadGateway = true;
private boolean ifDelay = true; private boolean ifDelay = true;
private boolean isInfoSuccess = true;
/** /**
* Get sum of two value. * Get sum of two value.
* @param value1 value 1 * @param value1 value 1
@ -83,13 +81,8 @@ public class QuickstartCalleeController {
*/ */
@GetMapping("/info") @GetMapping("/info")
public ResponseEntity<String> info() { public ResponseEntity<String> info() {
if (isInfoSuccess) { LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties);
LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties); return new ResponseEntity<>(String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.OK);
return new ResponseEntity<>(String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.OK);
}
else {
return new ResponseEntity<>(String.format("Failed to call quickstart [%s] service [%s:%s]. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.BAD_GATEWAY);
}
} }
/** /**
@ -173,19 +166,6 @@ public class QuickstartCalleeController {
} }
} }
@GetMapping("/setInfoSuccess")
public String setInfoSuccess(@RequestParam boolean param) {
this.isInfoSuccess = param;
if (param) {
LOG.info("infoSuccess is set to true.");
return "infoSuccess is set to true.";
}
else {
LOG.info("infoSuccess is set to false.");
return "infoSuccess is set to false.";
}
}
@GetMapping("/faultDetect") @GetMapping("/faultDetect")
public ResponseEntity<String> health() throws InterruptedException { public ResponseEntity<String> health() throws InterruptedException {
if (ifBadGateway) { if (ifBadGateway) {

Loading…
Cancel
Save