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
CascadingLocalTest and CascadingHadoopTest require a particular execution order for the tests to work: They run the testWriteToES() first to create the index and then run the testReadFromES() to ready that index.
The JUnit assumes that all tests can be performed in an arbitrary order and often it runs the testReadFromES() before the testWriteToES().
Note: To reproduce the issue when an external ES is used make sure to delete the old indexes:
Call the testWriteToES() and testReadToES() in a single test method to enforce the execution order. I've tried this in the upstreammaster branch: bd389e3
Upgrade to JUnit 4.11 and use the @FixMethodOrder(MethodSorters.NAME_ASCENDING) class annotation. Rename the methods so that read test comes second. Have not tested this option
Fixed in master. Part of a bigger refactoring to the test infrastructure.
The tests are now grouped in unit and integration (following the ES layout), the latter being grouped per package into mr/cascading/hive/pig. To cope with ordering, since JUnit doesn't offer many options, I've settled for using Suite - this way ES can be started/stopped for a set of tests (not per test which is way too granular and doesn't preserve state between them which is needed) and the order of the tests (not their methods but that's not relevant) can also be specified.
CascadingLocalTest and CascadingHadoopTest require a particular execution order for the tests to work: They run the testWriteToES() first to create the index and then run the testReadFromES() to ready that index.
The JUnit assumes that all tests can be performed in an arbitrary order and often it runs the testReadFromES() before the testWriteToES().
Note: To reproduce the issue when an external ES is used make sure to delete the old indexes:
Solutions:
Related issues: #27 and #30
The text was updated successfully, but these errors were encountered: