Details
-
Test
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.13.1
-
None
-
None
Description
The following two tests failed in Junit 4.8.3 which were the explicit Junit version in the dependency.
testPlanIdWithShuffledStreamSpecs
testGeneratePlanIdWithDifferentStreamSpecs
Here is the stack trace:
[ant:scalac] Element '/Users/fji/workspace/samza-li_trunk/samza/build/samza-core_2.10/resources/main' does not exist.
[ant:scalac] Element '/Users/fji/workspace/samza-li_trunk/samza/build/samza-api/resources/test' does not exist.
/Users/fji/workspace/samza-li_trunk/samza/samza-core/src/test/java/org/apache/samza/runtime/TestLocalApplicationRunner.java:374: error: cannot find symbol
assertNotEquals("Expected both of the latch ids to be different", planIdBeforeShuffle,
^
symbol: method assertNotEquals(String,String,String)
location: class TestLocalApplicationRunner
/Users/fji/workspace/samza-li_trunk/samza/samza-core/src/test/java/org/apache/samza/runtime/TestLocalApplicationRunner.java:412: error: cannot find symbol
assertNotEquals("Expected both of the latch ids to be different", planIdBeforeShuffle,
^
symbol: method assertNotEquals(String,String,String)
location: class TestLocalApplicationRunner
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
:samza-core_2.10:compileTestScala FAILED
If Junit 4.12 is picked, the tests may be passed, but if 4.8.3 is picked, the tests will fail.
It is better to use consistent Junit version for all tests in the project. Currently, if Junit 4.8.3 is used, these two tests will fail, if 4.12 is used, all the unit tests which use ExpectedException will fail due to the pulling of hamcrest lib from mockito-all instead of hamcrest-core itself.
For the long term, we need to remove all dependency on mockito-all since it is bad practice to depend on that lib, since it includes the other dependency code in mockito-all directly which may cause dependency resolving problem.
For the short term, we refactor these two tests to make sure they can pass in different versions of Junit.
This JIRA is for short term purpose.
Attachments
Issue Links
- links to