You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/08/11 12:53:48 UTC
[camel] 01/01: camel-core - Run test faster
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch fc
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6955de1130b0d7044cc765abbe7606c63991daea
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Aug 11 14:53:37 2023 +0200
camel-core - Run test faster
---
.../file/cluster/FileLockClusteredRoutePolicyFactoryTest.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/cluster/FileLockClusteredRoutePolicyFactoryTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/cluster/FileLockClusteredRoutePolicyFactoryTest.java
index af11a86d882..4779b50cc2d 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/cluster/FileLockClusteredRoutePolicyFactoryTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/cluster/FileLockClusteredRoutePolicyFactoryTest.java
@@ -52,7 +52,7 @@ public final class FileLockClusteredRoutePolicyFactoryTest {
SCHEDULER.submit(() -> run(id));
}
- LATCH.await(1, TimeUnit.MINUTES);
+ LATCH.await(20, TimeUnit.SECONDS);
SCHEDULER.shutdownNow();
assertEquals(CLIENTS.size(), RESULTS.size());
@@ -71,8 +71,8 @@ public final class FileLockClusteredRoutePolicyFactoryTest {
FileLockClusterService service = new FileLockClusterService();
service.setId("node-" + id);
service.setRoot(TestSupport.testDirectory(FileLockClusteredRoutePolicyTest.class, true).toString());
- service.setAcquireLockDelay(1, TimeUnit.SECONDS);
- service.setAcquireLockInterval(1, TimeUnit.SECONDS);
+ service.setAcquireLockDelay(100, TimeUnit.MILLISECONDS);
+ service.setAcquireLockInterval(100, TimeUnit.MILLISECONDS);
DefaultCamelContext context = new DefaultCamelContext();
context.disableJMX();
@@ -82,7 +82,7 @@ public final class FileLockClusteredRoutePolicyFactoryTest {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("timer:file-lock?delay=1000&period=1000").routeId("route-" + id).log("From ${routeId}")
+ from("timer:file-lock?delay=10&period=100").routeId("route-" + id).log("From ${routeId}")
.process(e -> contextLatch.countDown());
}
});
@@ -92,7 +92,7 @@ public final class FileLockClusteredRoutePolicyFactoryTest {
Thread.sleep(ThreadLocalRandom.current().nextInt(500));
context.start();
- contextLatch.await();
+ contextLatch.await(10, TimeUnit.SECONDS);
LOGGER.debug("Shutting down node {}", id);
RESULTS.add(id);