Skip to content

Commit

Permalink
modify pizza-sender for timeout testing, adding pizzapper secodns
Browse files Browse the repository at this point in the history
  • Loading branch information
Woj-Teh committed Aug 30, 2023
1 parent 1b27473 commit 3c58600
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private List<Pizza> createPizzas() {

@EventListener(ApplicationReadyEvent.class)
public void onApplicationEvent() {
sendPizzas(20, 300);
sendPizzas(1, 1);
}

@GetMapping("/send")
Expand Down Expand Up @@ -94,9 +94,11 @@ public ResponseEntity<String> sendPizzas(

// Use the logger to log the pizza being sent
logger.info("Sending pizza: " + randomPizza.getName());

}, i * 1000 / pizzasPerSec, TimeUnit.MILLISECONDS);
}


return ResponseEntity.ok("Sending pizzas in progress!");
}

Expand Down

0 comments on commit 3c58600

Please sign in to comment.