Fix more issues from Sonar report
This commit is contained in:
@@ -91,7 +91,7 @@ public class DelayerUsageTests {
|
||||
long start = System.currentTimeMillis();
|
||||
inputA.send(builder.build());
|
||||
assertThat(outputA.receive(10000)).isNotNull();
|
||||
assertThat(System.currentTimeMillis() - start).isCloseTo(2000, withinPercentage(5));
|
||||
assertThat(System.currentTimeMillis() - start).isCloseTo(2000, withinPercentage(10));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.integration.dsl.flowservices;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.withinPercentage;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
@@ -25,7 +26,6 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.assertj.core.data.Percentage;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.aop.framework.Advised;
|
||||
@@ -145,7 +145,7 @@ public class FlowServiceTests {
|
||||
.isEqualTo("B");
|
||||
|
||||
assertThat(receive2.getHeaders().getTimestamp() - receive1.getHeaders().getTimestamp())
|
||||
.isCloseTo(500, Percentage.withPercentage(10));
|
||||
.isCloseTo(500, withinPercentage(20));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
Reference in New Issue
Block a user