bkonold commented on a change in pull request #1159: Fix
ClusterBasedProcessorLifecycleListener test to exit without waiting for timeout
URL: https://github.com/apache/samza/pull/1159#discussion_r325333697
##########
File path:
samza-core/src/test/java/org/apache/samza/runtime/TestClusterBasedProcessorLifecycleListener.java
##########
@@ -79,11 +79,14 @@ public void testLifecycleListenerAfterFailure() {
public void testShutdownHookInvokesShutdownHookCallback() {
doNothing().when(mockShutdownHookCallback).run();
- // setup shutdown hook
+ // call beforeStart to setup shutdownHook
clusterBasedProcessorLifecycleListener.beforeStart();
// Simulating shutdown hook invocation by JVM
clusterBasedProcessorLifecycleListener.getShutdownHookThread().run();
+
+ // call afterStop to countdown shutdownLatch
+ clusterBasedProcessorLifecycleListener.afterStop();
Review comment:
Just to clarify, this is to address the following line always waiting until
the timeout?
https://github.com/apache/samza/blob/9b3a9e68bca8cfef8a87542143212015b5263cea/samza-core/src/main/java/org/apache/samza/runtime/ClusterBasedProcessorLifecycleListener.java#L95
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services