commit | bd6c9eba5d43ad2d79a84909feef36d22389d636 | [log] [tgz] |
---|---|---|
author | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Thu Jul 05 15:47:53 2018 -0400 |
committer | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Thu Jul 05 15:48:32 2018 -0400 |
tree | e233a8a5b8e261bee33d6843d1b532f647a2be8e | |
parent | 96bc1ab6f12ee8abdbac877958488ca4c7f298da [diff] |
Remove use of Thread.sleep Using TimeUtil.<timeunit>.sleep() method is more readable and fixes the Sonar issue. Change-Id: I9f71aac442ace0aaed49eb1af8986147fa5c4bcc
diff --git a/src/test/java/com/ericsson/gerrit/plugins/heartbeat/HeartbeatDaemonTest.java b/src/test/java/com/ericsson/gerrit/plugins/heartbeat/HeartbeatDaemonTest.java index 3aec912..765daac 100644 --- a/src/test/java/com/ericsson/gerrit/plugins/heartbeat/HeartbeatDaemonTest.java +++ b/src/test/java/com/ericsson/gerrit/plugins/heartbeat/HeartbeatDaemonTest.java
@@ -29,6 +29,7 @@ import com.google.gwtorm.client.KeyUtil; import com.google.gwtorm.server.SchemaFactory; import com.google.gwtorm.server.StandardKeyEncoder; +import java.util.concurrent.TimeUnit; import org.junit.Before; import org.junit.Test; @@ -66,7 +67,7 @@ replay(eventDispatcherMock); heartbeatDaemon.start(); - Thread.sleep(500); + TimeUnit.MILLISECONDS.sleep(500); verify(eventDispatcherMock); heartbeatDaemon.stop(); }