Skip to content

Commit

Permalink
Merge pull request Azure#5 from moarychan/moary/fix-pipeline-failures
Browse files Browse the repository at this point in the history
Fix pipeline failures
  • Loading branch information
rujche authored Jan 10, 2022
2 parents 47b8259 + ac17feb commit 3b97a6e
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.junit.jupiter.params.provider.EnumSource;

import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -52,9 +51,9 @@ void isDown(Instrumentation.Type type) {
AbstractProcessorInstrumentation<T> instrumentation = getProcessorInstrumentation(type, window);
instrumentation.markError(errorContext);
assertTrue(instrumentation.isDown());
sleep(1);
sleepSeconds(1);
assertTrue(instrumentation.isDown());
sleep(1);
sleepSeconds(1);
assertFalse(instrumentation.isDown());
}

Expand All @@ -68,9 +67,9 @@ void makeError(Instrumentation.Type type) {
assertNull(instrumentation.getException());
}

private void sleep(long sleep) {
private void sleepSeconds(long sleep) {
try {
TimeUnit.of(ChronoUnit.SECONDS).sleep(sleep);
TimeUnit.SECONDS.sleep(sleep);
} catch (InterruptedException e) {

}
Expand Down

0 comments on commit 3b97a6e

Please sign in to comment.