Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix main build #142

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
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 @@ -19,28 +19,24 @@
import org.apache.camel.CamelContext;
import org.apache.camel.example.cafe.test.TestDrinkRouter;
import org.apache.camel.example.cafe.test.TestWaiter;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

class CafeRouteSpringTest extends CafeRouteBuilderTest {
private AbstractApplicationContext applicationContext;

@Override
@BeforeEach
public void setUp() throws Exception {
public void setupResources() throws Exception {
applicationContext = new ClassPathXmlApplicationContext("META-INF/camel-routes.xml");
setUseRouteBuilder(false);
super.setUp();
testConfigurationBuilder.withUseRouteBuilder(false);
super.setupResources();
waiter = applicationContext.getBean("waiter", TestWaiter.class);
driverRouter = applicationContext.getBean("drinkRouter", TestDrinkRouter.class);
}

@Override
@AfterEach
public void tearDown() throws Exception {
super.tearDown();
public void cleanupResources() throws Exception {
super.cleanupResources();
if (applicationContext != null) {
applicationContext.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ protected CamelContext createCamelContext() throws Exception {
return camelContext;
}

@BeforeEach
public void setUp() throws Exception {
public void setupResources() throws Exception {
// Replace the from endpoint to send messages easily
// still use the deprecated method for now as method is not visible camelContextConfiguration().replaceRouteFromWith("input", "direct:in");
replaceRouteFromWith("input", "direct:in");
super.setUp();
super.setupResources();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
import java.util.Properties;
import java.util.concurrent.TimeUnit;

import org.apache.camel.builder.AdviceWith;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.main.MainConfigurationProperties;
import org.apache.camel.test.main.junit5.CamelMainTestSupport;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.apache.camel.util.PropertiesHelper.asProperties;
Expand All @@ -40,11 +38,11 @@ protected Properties useOverridePropertiesWithPropertiesComponent() {
}

@Override
@BeforeEach
public void setUp() throws Exception {
public void setupResources() throws Exception {
// Prevent failure by replacing the failing endpoint
// still use the deprecated method for now as method is not visible camelContextConfiguration().replaceRouteFromWith("netty", "direct:foo");
replaceRouteFromWith("netty", "direct:foo");
super.setUp();
super.setupResources();
}

@Test
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
<module>kamelet-chucknorris</module>
<module>kamelet-main</module>
<module>kamelet-sql</module>
<module>kotlin</module>
<!-- Commenting out kotlin as there are compilation failure and the dsl is now deprecated -->
<!--<module>kotlin</module>-->
<module>loadbalancing</module>
<module>main</module>
<module>main-endpointdsl</module>
Expand Down
Loading