This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 28d9a63 Fixed test
28d9a63 is described below
commit 28d9a63e8c862df28841e0b31765d3d35f7a2d67
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Mar 16 16:12:28 2020 +0100
Fixed test
---
.../zookeepermaster/MasterEndpointFailoverTest.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git
a/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/MasterEndpointFailoverTest.java
b/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/MasterEndpointFailoverTest.java
index 0fbefa7..0e8bcea 100644
---
a/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/MasterEndpointFailoverTest.java
+++
b/components/camel-zookeeper-master/src/test/java/org/apache/camel/component/zookeepermaster/MasterEndpointFailoverTest.java
@@ -87,17 +87,18 @@ public class MasterEndpointFailoverTest {
}
});
// Need to start at less one consumerContext to enable the vm queue
for producerContext
- ServiceHelper.startService(consumerContext1);
- ServiceHelper.startService(producerContext);
+ producerContext.start();
+ consumerContext1.start();
+
result1Endpoint = consumerContext1.getEndpoint("mock:result1",
MockEndpoint.class);
result2Endpoint = consumerContext2.getEndpoint("mock:result2",
MockEndpoint.class);
}
@After
public void afterRun() throws Exception {
- ServiceHelper.stopService(consumerContext1);
- ServiceHelper.stopService(consumerContext2);
- ServiceHelper.stopService(producerContext);
+ consumerContext1.stop();
+ consumerContext2.stop();
+ producerContext.stop();
zkClientBean.destroy();
zkContainer.stop();
}
@@ -105,16 +106,15 @@ public class MasterEndpointFailoverTest {
@Test
public void testEndpoint() throws Exception {
LOG.info("Starting consumerContext1");
-
- ServiceHelper.startService(consumerContext1);
+ consumerContext1.start();
assertMessageReceived(result1Endpoint, result2Endpoint);
LOG.info("Starting consumerContext2");
- ServiceHelper.startService(consumerContext2);
+ consumerContext2.start();
assertMessageReceivedLoop(result1Endpoint, result2Endpoint, 3);
LOG.info("Stopping consumerContext1");
- ServiceHelper.stopService(consumerContext1);
+ consumerContext1.stop();
assertMessageReceivedLoop(result2Endpoint, result1Endpoint, 3);
}