diff --git a/src/main/java/uk/gov/hmcts/befta/player/DefaultBackEndFunctionalTestScenarioPlayer.java b/src/main/java/uk/gov/hmcts/befta/player/DefaultBackEndFunctionalTestScenarioPlayer.java index 73fc446b..e618b370 100644 --- a/src/main/java/uk/gov/hmcts/befta/player/DefaultBackEndFunctionalTestScenarioPlayer.java +++ b/src/main/java/uk/gov/hmcts/befta/player/DefaultBackEndFunctionalTestScenarioPlayer.java @@ -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); } }