sijie commented on a change in pull request #944: Introduce MockClock and
MockExecutorController to improve timer-based testing
URL: https://github.com/apache/bookkeeper/pull/944#discussion_r159735555
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDirsMonitor.java
##########
@@ -40,117 +45,109 @@
/**
* Thread to monitor the disk space periodically.
*/
-class LedgerDirsMonitor extends BookieThread {
+class LedgerDirsMonitor {
Review comment:
@jvrao :
the PR is more about introducing mock executor to improve testing ability.
I am using changing LedgerDirsMonitor from a thread based approach to an
executor based approach as an example, to demonstrate how an executor based
approach together with a mock executor can improve testing ability.
I was thinking of separating this PR into two, but that means the reviewers
don't have the direct impression on how an executor based approach together
with a mock executor can improve testing ability. I choose LedgerDirsMonitor as
the example to demonstrate is becase it is a real self-contained class that can
be easily converted from a thread based approach to an executor based approach.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services