You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Body of method testParser is wropped in try/catch block and the catch block only logs an exception. As a consequence, if an exception is thrown during the test execution, it is not propagated to a caller method, and a test is treated as a SUCCESS.
As an example, test testEventParserWithEventEiffelIssueDefinedEvent succeeds although it cannot open file expected_parsed_EiffelIssueDefinedEvent.json, because it's incorrectly named expected_parsed_EiffelIssueDefined.json.
There's a stack trace displayed by the test method in a log, but it's very easy to overlook it in a flood of other messages. However, the test should be treated as FAILed and listed in final overview of test results.
This particular test testEventParserWithEventEiffelIssueDefinedEvent has been fixed as part of #302, however it would be good to remove the catch section from method testParser and check that other test results are reported properly.
Additional Context
No response
Logs
No response
Expected Behavior
If any failure ocures during a test, the test should be marked as FAILed, unless it is an expected failure.
Steps To Reproduce
Command mvn clean package reports
11:24:50.582 [main] ERROR com.ericsson.eiffel.remrem.publish.service.EventTemplateHandlerTest - File 'src/test/resources/expectedParsedEvents/expected_parsed_EiffelIssueDefinedEvent.json' does not exist
java.io.FileNotFoundException: File 'src/test/resources/expectedParsedEvents/expected_parsed_EiffelIssueDefinedEvent.json' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:2115)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:2234)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:2251)
at com.ericsson.eiffel.remrem.publish.service.EventTemplateHandlerTest.testParser(EventTemplateHandlerTest.java:360)
at com.ericsson.eiffel.remrem.publish.service.EventTemplateHandlerTest.testEventParserWithEventEiffelIssueDefinedEvent(EventTemplateHandlerTest.java:350)
Description
Body of method
testParser
is wropped intry/catch
block and thecatch
block only logs an exception. As a consequence, if an exception is thrown during the test execution, it is not propagated to a caller method, and a test is treated as a SUCCESS.As an example, test
testEventParserWithEventEiffelIssueDefinedEvent
succeeds although it cannot open fileexpected_parsed_EiffelIssueDefinedEvent.json
, because it's incorrectly namedexpected_parsed_EiffelIssueDefined.json
.There's a stack trace displayed by the test method in a log, but it's very easy to overlook it in a flood of other messages. However, the test should be treated as FAILed and listed in final overview of test results.
This particular test
testEventParserWithEventEiffelIssueDefinedEvent
has been fixed as part of #302, however it would be good to remove thecatch
section from methodtestParser
and check that other test results are reported properly.Additional Context
No response
Logs
No response
Expected Behavior
If any failure ocures during a test, the test should be marked as FAILed, unless it is an expected failure.
Steps To Reproduce
Command
mvn clean package
reportsNevertheless overall conclusion of the build is
and exit status of the process is
0
.The version of this project/repo, if applicable
2.1.5
The version/edition of the Eiffel Protocol used, if applicable
All, not related to particular protocol
The text was updated successfully, but these errors were encountered: