Increase test service latency to help it to be counted (#3211)

The current latency of the test service is too slow, causing it's not counted and
the query result is 0, this patch increases the latency intentionally by sleeping
1 second
This commit is contained in:
kezhenxu94 2019-08-03 18:18:32 +08:00 committed by 吴晟 Wu Sheng
parent 532f430369
commit 3549d074b0
2 changed files with 4 additions and 2 deletions

View File

@ -42,7 +42,8 @@ public class TestController {
}
@PostMapping("/users")
public User createAuthor(@RequestBody final User user) {
public User createAuthor(@RequestBody final User user) throws InterruptedException {
Thread.sleep(1000L);
return userRepo.save(user);
}
}

View File

@ -42,7 +42,8 @@ public class TestController {
}
@PostMapping("/users")
public User createAuthor(@RequestBody final User user) {
public User createAuthor(@RequestBody final User user) throws InterruptedException {
Thread.sleep(1000L);
return userRepo.save(user);
}
}