apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.27k stars 1.23k forks source link

Improve controller rest api test #5688

Open kishoreg opened 4 years ago

kishoreg commented 4 years ago

Every end point test does the following

This is inefficient and we can definitely run all the tests using just one integration test.

amrishlal commented 3 years ago

I looked at the test classes under org.apache.pinot.controller.api package. For test classes that do startZk(); startController(), one option may be to create a component level testng.xml configuration file with <suite>...</suite> that would contain these test classes. This will allow for specifying a @BeforeSuite method to run startZk(); startController() once before all the suite test cases and @AfterSuite to run stopController();stopZk(); after all the suite test cases.

There are also some test classes that invoke startController() with properties (AccessControlTest for example) and some test classes that don't invoke either startZk() or startController() (ControllerFilePathProviderTest for example), so these would not be listed in the suite.

What about other packages under org.apache.pinot.controller (for example ...helix.ControllerInstanceToggleTest)? Do we want to add them to the test suite as well since these classes are also doing startZk() or startController()?