Jenkins setup and PhySOLROPs refactor
- Remove the TestNG dependency from the POM.
Note: TestNG was used only in the AbstractTestSuit abstract class that Rana created to use with her TestRedisSQLQuery test class. But we're using JUnit in all of our Tatooine tests, and her test can be rewritten with JUnit instead of TestNG.
- Delete
AbstractTestSuitand rewriteTestRedisSQLQueryto work with JUnit. - Rename
PhysMemoryTesttoPhyMemoryTestandNestTesttoPhyMemoryNestTestto comply with our naming standard of physical OPs. - Replace references of
org.apache.jena.ext.com.google.common.base.Stringswhich is repackaged, tocom.google.common.base.Strings. - Make
PhyRedisEvalTestextend fromBaseTest, like all of our Tatooine tests. - Fix wrong text file path used in
PhySparkAQLEvalTest.
- Refactor PhySOLROperator and tests.
Note: Previously, this class combined domain logic and DB calls, which are two separate concerns. I created an interface (DBSourceLayer) and moved all DB calls to an implementation of such interface (SOLRSourceLayer). This has the added advantage of greatly simplifying testing: Only this interface needs to be mocked when unit testing. I then reworked PhySOLRScanTest and PhySOLREvalTest and used Mockito to mock a SOLR response for unit tests, which test the operator itself and assume SOLR is working as expected. I then created PhySOLRScanIntegrationTest and PhySOLREvalIntegrationTest, which are integration tests and not unit tests: They test both the connection to SOLR and the operator.