Skip to content

Commit

Permalink
Add slow endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mtarjanyi committed Mar 22, 2018
1 parent 011b911 commit 933df1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public Flux<Person> getAllAsStream()
return mongoRepository.findAll().delayElements(Duration.ofMillis(1000));
}

@GetMapping("/slow")
public Mono<String> slowEndpoint()
{
return Mono.delay(Duration.ofSeconds(3))
.then(Mono.just(Thread.currentThread().getName()));
}

@ResponseBody
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<?> response()
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spring.data.mongodb.host=192.168.99.100
spring.redis.host=192.168.99.100
spring.data.mongodb.host=localhost
spring.redis.host=localhost

0 comments on commit 933df1b

Please sign in to comment.