lucasbru commented on code in PR #22951:
URL: https://github.com/apache/kafka/pull/22951#discussion_r3977268882


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/StateManagerUtilTest.java:
##########
@@ -222,12 +222,14 @@ public void 
shouldNotCloseStateManagerIfUnableToLockTaskDirectory() {
         final InOrder inOrder = inOrder(stateManager, stateDirectory);
         when(stateManager.taskId()).thenReturn(taskId);
         when(stateDirectory.lock(taskId)).thenReturn(false);
+        when(stateDirectory.lockOwner(taskId)).thenReturn(new 
Thread("other-stream-thread"));

Review Comment:
   Both tests here stub lockOwner() to return a different thread, so they only 
cover the new DEBUG branch. Is there a test for the retained WARN branch 
(lockOwner() returning null, or the current thread)? Without one, that path 
could regress silently.



-- 
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]

Reply via email to