You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/10/14 14:37:06 UTC
[camel] branch main updated: CAMEL-18608: Fix the test QuartzStopRouteTest.testQuartzSuspend
This is an automated email from the ASF dual-hosted git repository.
nfilotto 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 6494633981d CAMEL-18608: Fix the test QuartzStopRouteTest.testQuartzSuspend
6494633981d is described below
commit 6494633981de625c8d4baf7862dce6cc2293913e
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Fri Oct 14 16:36:33 2022 +0200
CAMEL-18608: Fix the test QuartzStopRouteTest.testQuartzSuspend
---
.../camel/component/quartz/QuartzStopRouteTest.java | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzStopRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzStopRouteTest.java
index ee7580f4489..b1491fff263 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzStopRouteTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzStopRouteTest.java
@@ -20,33 +20,27 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class QuartzStopRouteTest extends BaseQuartzTest {
+class QuartzStopRouteTest extends BaseQuartzTest {
@Test
- public void testQuartzSuspend() throws Exception {
+ void testQuartzSuspend() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMinimumMessageCount(1);
- MockEndpoint.assertIsSatisfied(context);
+ mock.assertIsSatisfied();
context.getRouteController().stopRoute("foo");
- int size = mock.getReceivedCounter();
- assertEquals(1, size, "Should not schedule when stopped");
-
- MockEndpoint.resetMocks(context);
-
+ mock.reset();
mock.expectedMessageCount(0);
mock.assertIsSatisfied(3000);
- MockEndpoint.resetMocks(context);
+ mock.reset();
mock.expectedMinimumMessageCount(1);
context.getRouteController().startRoute("foo");
- MockEndpoint.assertIsSatisfied(context);
+ mock.assertIsSatisfied();
}
@Override