Fix more issues from Sonar report

This commit is contained in:
Artem Bilan
2022-11-03 12:44:26 -04:00
parent 0b9bab313b
commit 5f1c0c17de
13 changed files with 60 additions and 50 deletions

View File

@@ -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

View File

@@ -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