paul-rogers opened a new issue, #12642:
URL: https://github.com/apache/druid/issues/12642

   `SqlLifecycleTest` is structured poorly. Rather than verify the *contract* 
that this class must provide, the code uses mocks to verify the 
*implementation*. That is, the tests verify that `SqlLifecycleTest` makes 
certain calls in a certain order to `DruidPlanner`.
   
   In general, implementation evolves, but the contract (interface) tends to 
evolve slower. Tests want to verify that `SqlLifecycle` does what it advertises 
to do. Testing the implementation leads to brittle tests. Further, such test 
don't actually tell us that the class performs its function, only that it is 
going through the motions.
   
   This test should be rewritten to use a real `DruidPlanner` (which enforces 
its own lifecycle) and to verify that each public method does what it 
advertises to do. Omit the part of the tests which verify implementation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to