-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
There's a bug in the MockEndpoint.assertIsNotSatisfied() method which causes the method to pass whether the assertion succeeds or fails. The method calls assertIsSatisfied(). If that method throws an AssertionError, then the test is deemed to pass. However, if that method does not throw an AssertionError, assertIsNotSatisfied() calls the fail() method. This doesn't work however, since the fail method throws an AssertionError. Since this AssertionError is caught (the one thrown because no other AssertionError was thrown) the test is deemed to have passed. I've rearranged the assertIsNotSatisfied() method to behave as it was no doubt intended to in the attached patch. With this change, the following tests also had to be modified in order to pass with the fixed method:
camel-core/src/test/java/org/apache/camel/builder/ValueBuilderTest.java
camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
As well, the attached patch increases result wait times for the following tests so that they pass more reliably on slow machines like the aix boxes we are using:
components/camel-rss/src/test/java/org/apache/camel/component/rss/RssEntrySortTest.java
components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomEntrySortTest.java
camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java
Made a minor change to the following test to help "prime" things so that the testing of total processing times would be more uniform and likely to pass on slow machines:
camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
Added a check that the service was started which seems to make the following test pass reliably on a slow machine:
camel-core/src/test/java/org/apache/camel/management/ManagedTimerTest.java
Finally, the attached patch resolves a character encoding issue which was causing a compilation failure with the ibm jdk on aix for the following file:
camel-core/src/test/java/org/apache/camel/processor/ConvertBodyTest.java