Skip to content

Commit

Permalink
implement match retrypolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
aktaskaan committed Jul 19, 2024
1 parent 000a883 commit 6d991a5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,16 +357,19 @@ public void submitTheRequestToCallAnOperationOfAProduct(String operation, String
}

@Override
@When("it is submitted to call the [{}] operation of [{}] [{}] delaying [{}] seconds ")
@When("it is submitted to call the [{}] operation of [{}] [{}] delaying [{}] seconds")
public void submitTheRequestToCallAnOperationOfAProductWithDelay(String operation, String productName, String order,
int delay) throws IOException, InterruptedException {
long delayInMillisecond = delay * 1000L;
boolean isAfter = "after".equals(order);
if (!isAfter) {
Thread.sleep(delay);
logger.info("Delaying {} seconds before the call '{}'", delay, operation);
Thread.sleep(delayInMillisecond);
}
submitTheRequestToCallAnOperationOfAProduct(this.scenarioContext, operation, productName);
if (isAfter) {
Thread.sleep(delay);
Thread.sleep(delayInMillisecond);
logger.info("Delaying {} seconds after the call '{}'", delay, operation);
}
}

Expand Down

0 comments on commit 6d991a5

Please sign in to comment.