mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
yield result code from http error handler
This commit is contained in:
parent
9a7a897018
commit
3809db4b47
@ -77,6 +77,8 @@ public class HttpAction implements SyncAction {
|
||||
} finally {
|
||||
}
|
||||
|
||||
int resultCode=0;
|
||||
|
||||
while (tries < maxTries) {
|
||||
tries++;
|
||||
|
||||
@ -128,6 +130,7 @@ public class HttpAction implements SyncAction {
|
||||
} else {
|
||||
// count and log exception types
|
||||
ErrorDetail detail = httpActivity.getErrorHandler().handleError(error, cycle, nanos);
|
||||
resultCode=detail.resultCode;
|
||||
if (!detail.isRetryable()) {
|
||||
break; // break out of the tries loop without retrying, because the error handler said so
|
||||
}
|
||||
@ -139,7 +142,7 @@ public class HttpAction implements SyncAction {
|
||||
|
||||
httpActivity.triesHisto.update(tries);
|
||||
|
||||
return 0;
|
||||
return resultCode;
|
||||
}
|
||||
|
||||
private HttpRequest.BodyPublisher bodySourceFrom(Map<String, String> cmdMap) {
|
||||
|
Loading…
Reference in New Issue
Block a user