apupier commented on code in PR #24856:
URL: https://github.com/apache/camel/pull/24856#discussion_r3603797919
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/language/SpringTokenXMLPairNamespaceSplitTest.java:
##########
@@ -33,7 +34,9 @@ protected CamelContext createCamelContext() throws Exception {
@Override
@Test
- public void testTokenXMLPair2() throws Exception {
- // noop
+ public void testTokenXMLPair2() {
+ // noop - not applicable for Spring XML variant
+ assertDoesNotThrow(() -> {
+ });
Review Comment:
would be better to provide a Disable annotation so that we can clearly see
that the test is not played in reports instead fo false assumptions that it is
working
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/ErrorHandlerCamelContextRefNotFoundTest.java:
##########
@@ -49,6 +50,8 @@ protected AbstractXmlApplicationContext
createApplicationContext() {
@Test
public void testDummy() {
- // noop
+ // Validation is done in setUp()
+ assertDoesNotThrow(() -> {
+ });
Review Comment:
Shouldn't we move it to the test directly?
And if not possible, rename the test to explain what is tested
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/ErrorHandlerRouteContextRefNotFoundTest.java:
##########
@@ -49,6 +50,8 @@ protected AbstractXmlApplicationContext
createApplicationContext() {
@Test
public void testDummy() {
- // noop
+ // Validation is done in setUp()
+ assertDoesNotThrow(() -> {
+ });
Review Comment:
Shouldn't we move it to the test directly?
And if not possible, rename the test to explain what is tested
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/SpringRouteNoFromTest.java:
##########
@@ -35,7 +36,9 @@ public void setUp() throws Exception {
@Test
public void testRouteNoFrom() {
- // noop
+ // Validation is done in createApplicationContext()
+ assertDoesNotThrow(() -> {
+ });
Review Comment:
Shouldn't we move it to the test directly?
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/OnExceptionNoExceptionConfiguredTest.java:
##########
@@ -41,6 +42,8 @@ protected AbstractXmlApplicationContext
createApplicationContext() {
@Test
public void testDummy() {
- // noop
+ // Validation is done in setUp()
+ assertDoesNotThrow(() -> {
+ });
Review Comment:
Shouldn't we move it to the test directly?
And if not possible, rename the test to explain what is tested
##########
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java:
##########
@@ -22,15 +22,19 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+
@ContextConfiguration
public class SpringTraceTest extends SpringRunWithTestSupport {
@Autowired
protected ProducerTemplate camelTemplate;
@Test
- public void testTracing() throws Exception {
- camelTemplate.sendBody("Hello");
- camelTemplate.sendBody(1234);
+ public void testTracing() {
+ assertDoesNotThrow(() -> {
+ camelTemplate.sendBody("Hello");
+ camelTemplate.sendBody(1234);
+ });
Review Comment:
this test should test the tracing in some ways, here it doesn't sound like
being the case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]