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 8098f39f2ec Remove tests as its allowed now due to CAMEL-16374
8098f39f2ec is described below
commit 8098f39f2ec7d0ab55141ec6c5fd83297cf144f7
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Nov 19 14:01:42 2023 +0100
Remove tests as its allowed now due to CAMEL-16374
---
.../SpringOnCompletionCompleteAndFailureTest.java | 50 ---------------------
.../SpringOnCompletionCompleteAndFailureTest.xml | 40 -----------------
.../OnCompletionCompleteAndFailureTest.java | 51 ----------------------
3 files changed, 141 deletions(-)
diff --git
a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.java
b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.java
deleted file mode 100644
index b334928e0ab..00000000000
---
a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.processor;
-
-import org.apache.camel.spring.SpringTestSupport;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class SpringOnCompletionCompleteAndFailureTest extends
SpringTestSupport {
-
- @Override
- public void setUp() throws Exception {
- try {
- super.setUp();
- Assertions.fail("Should throw exception");
- } catch (Exception e) {
- assertEquals("Only 1 onCompletion is allowed per route.",
e.getMessage());
- }
- }
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext(
-
"org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.xml");
- }
-
- @Test
- public void testOnCompletion() throws Exception {
- // noop
- }
-
-}
diff --git
a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.xml
b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.xml
deleted file mode 100644
index f513e947a70..00000000000
---
a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionCompleteAndFailureTest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <jmxAgent id="jmx" disabled="true"/>
- <route>
- <from uri="direct:start"/>
- <onCompletion onCompleteOnly="true">
- <to uri="mock:ok"/>
- </onCompletion>
- <onCompletion onFailureOnly="true">
- <to uri="mock:error"/>
- </onCompletion>
- <to uri="mock:result"/>
- </route>
- </camelContext>
-</beans>
diff --git
a/core/camel-core/src/test/java/org/apache/camel/processor/OnCompletionCompleteAndFailureTest.java
b/core/camel-core/src/test/java/org/apache/camel/processor/OnCompletionCompleteAndFailureTest.java
deleted file mode 100644
index 3d6a4fdf5f9..00000000000
---
a/core/camel-core/src/test/java/org/apache/camel/processor/OnCompletionCompleteAndFailureTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class OnCompletionCompleteAndFailureTest extends ContextTestSupport {
-
- @Override
- public boolean isUseRouteBuilder() {
- return false;
- }
-
- @Test
- public void testMultipleRouteOnComplete() throws Exception {
- try {
- context.addRoutes(new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:start")
-
.onCompletion().onCompleteOnly().to("mock:ok").end()
-
.onCompletion().onFailureOnly().to("mock:error").end()
- .onCompletion().to("mock:all").end()
- .to("mock:result");
- }
- });
- //fail("Should throw exception"); Now allowed: CAMEL-16374
- } catch (IllegalArgumentException e) {
- assertEquals("Only 1 onCompletion is allowed per route.",
e.getMessage());
- }
- }
-
-}