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 13:31:11 UTC
[camel] branch main updated: camel-core - Run test faster (#11083)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e47a7a1d766 camel-core - Run test faster (#11083)
e47a7a1d766 is described below
commit e47a7a1d766ea9312f89ef86f655ee5a9916b21f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Aug 11 15:31:02 2023 +0200
camel-core - Run test faster (#11083)
---
.../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);