Tests are relying on external resources
Opened this issue · 0 comments
MichaelRoeder commented
Description
Some of our JUnit tests rely on external resources making them unstable. This should be avoided since it may lead to errors that are not bound to the implementation and it leads to timeouts in Travis (e.g., see https://travis-ci.org/dice-group/gerbil/builds/480844126).
List of affected tests
- EntityCheckerManagerImplTest
- HttpBasedEntityCheckerTest
- FilteringWhileLoadingTest
- OKE2018Task4Test
- Because of test case 3
- HTTPBasedSameAsRetrieverTest
- WikipediaApiBasedSingleUriSameAsRetrieverTest
The list can be easily constructed (or checked again), by checking out the project, disabling all networking and rerun all tests.
Proposed fixes
Further suggestions are welcome 😃
- the usage of external resources should be removed
- OKE2018Task4Test
- the mockup classes should be used (either by implementing a simple class or using the moquito library)
- EntityCheckerManagerImplTest
- FilteringWhileLoadingTest
- Use a simple HTTP mockup server (e.g., as it has been done in Squirrel https://github.com/dice-group/Squirrel/blob/master/squirrel.worker/src/test/java/org/dice_research/squirrel/robots/RobotsManagerImplTest.java)
- HttpBasedEntityCheckerTest
- HTTPBasedSameAsRetrieverTest
- WikipediaApiBasedSingleUriSameAsRetrieverTest