orpiske commented on code in PR #10804:
URL: https://github.com/apache/camel/pull/10804#discussion_r1272219145
##########
core/camel-main/src/test/java/org/apache/camel/main/MainSupportCommandLineTest.java:
##########
@@ -44,20 +45,20 @@ public CamelContext getCamelContext() {
}
@Test
- public void testMainSupport() throws Exception {
+ public void testMainSupport() {
MyMainSupport my = new MyMainSupport();
- my.run(new String[] { "-d", "1" });
+ Assertions.assertDoesNotThrow(() -> my.run(new String[] { "-d", "1"
}));
Review Comment:
Actually, the proposed change is right.
In the case `my.run` throws an exception, that gets recorded as a test error
not as a test failure. A test without assertions is not really testing anything
(or, just, doing half of the job).
##########
core/camel-main/src/test/java/org/apache/camel/main/MainSupportCommandLineTest.java:
##########
@@ -44,20 +45,20 @@ public CamelContext getCamelContext() {
}
@Test
- public void testMainSupport() throws Exception {
+ public void testMainSupport() {
MyMainSupport my = new MyMainSupport();
- my.run(new String[] { "-d", "1" });
+ Assertions.assertDoesNotThrow(() -> my.run(new String[] { "-d", "1"
}));
Review Comment:
Actually, the proposed change is correct.
In the case `my.run` throws an exception, that gets recorded as a test error
not as a test failure. A test without assertions is not really testing anything
(or, just, doing half of the job).
--
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]