Mentions légales du service

Skip to content

Jenkins setup and PhySOLROPs refactor

Oscar Mendoza requested to merge jenkins-setup into master
  • 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 AbstractTestSuit and rewrite TestRedisSQLQuery to work with JUnit.
  • Rename PhysMemoryTest to PhyMemoryTest and NestTest to PhyMemoryNestTest to comply with our naming standard of physical OPs.
  • Replace references of org.apache.jena.ext.com.google.common.base.Strings which is repackaged, to com.google.common.base.Strings.
  • Make PhyRedisEvalTest extend from BaseTest, 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.

Merge request reports

Loading