diff --git a/src/test/java/org/wiremock/grpc/GrpcAcceptanceTest.java b/src/test/java/org/wiremock/grpc/GrpcAcceptanceTest.java index 8eeed82..690d17a 100644 --- a/src/test/java/org/wiremock/grpc/GrpcAcceptanceTest.java +++ b/src/test/java/org/wiremock/grpc/GrpcAcceptanceTest.java @@ -17,7 +17,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; -import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -34,6 +33,7 @@ import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.StatusRuntimeException; +import java.time.Duration; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -269,7 +269,7 @@ void fixedDelay() { stopwatch.stop(); assertThat(greeting, is("Delayed hello")); - assertThat(stopwatch.elapsed(MILLISECONDS), greaterThanOrEqualTo(1000L)); + assertThat(stopwatch.elapsed(), greaterThanOrEqualTo(Duration.ofMillis(1000L))); } @Test @@ -284,6 +284,6 @@ void randomDelay() { stopwatch.stop(); assertThat(greeting, is("Delayed hello")); - assertThat(stopwatch.elapsed(MILLISECONDS), greaterThanOrEqualTo(500L)); + assertThat(stopwatch.elapsed(), greaterThanOrEqualTo(Duration.ofMullis(500L))); } }