Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.camel.component.jms.integration.spring.tx;

import java.util.concurrent.TimeUnit;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.jms.integration.spring.AbstractSpringJMSITSupport;
import org.apache.camel.component.mock.MockEndpoint;
Expand All @@ -27,6 +29,7 @@
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;

@Tags({ @Tag("not-parallel"), @Tag("spring"), @Tag("tx") })
Expand All @@ -47,7 +50,8 @@ public void testRouteId() throws Exception {

template.sendBody("activemq:queue:RouteIdTransactedTest", "Hello World");

MockEndpoint.assertIsSatisfied(context);
await().atMost(30, TimeUnit.SECONDS)
.untilAsserted(() -> MockEndpoint.assertIsSatisfied(context));
Comment on lines +53 to +54

String id = context.getRouteDefinitions().get(0).getId();
assertEquals("myCoolRoute", id);
Expand All @@ -61,7 +65,8 @@ public void testRouteIdFailed() throws Exception {

template.sendBody("activemq:queue:RouteIdTransactedTest", "Kaboom");

MockEndpoint.assertIsSatisfied(context);
await().atMost(30, TimeUnit.SECONDS)
.untilAsserted(() -> MockEndpoint.assertIsSatisfied(context));
Comment on lines +68 to +69

String id = context.getRouteDefinitions().get(0).getId();
assertEquals("myCoolRoute", id);
Expand Down