AmatyaAvadhanula commented on code in PR #13172:
URL: https://github.com/apache/druid/pull/13172#discussion_r996627510
##########
indexing-service/src/test/java/org/apache/druid/indexing/overlord/TaskLockboxTest.java:
##########
@@ -1258,6 +1259,39 @@ public void testGetLockedIntervalsForRevokedLocks()
throws Exception
);
}
+ @Test
+ public void testFailedToReacquireTaskLock() throws Exception
+ {
+ final Task badTask0 = NoopTask.withGroupId("BadTask");
Review Comment:
Done
##########
indexing-service/src/test/java/org/apache/druid/indexing/overlord/TaskLockboxTest.java:
##########
@@ -1258,6 +1259,39 @@ public void testGetLockedIntervalsForRevokedLocks()
throws Exception
);
}
+ @Test
+ public void testFailedToReacquireTaskLock() throws Exception
+ {
+ final Task badTask0 = NoopTask.withGroupId("BadTask");
+ final Task badTask1 = NoopTask.withGroupId("BadTask");
+ final Task goodTask0 = NoopTask.withGroupId("GoodTask");
+ taskStorage.insert(badTask0, TaskStatus.running(badTask0.getId()));
+ taskStorage.insert(badTask1, TaskStatus.running(badTask1.getId()));
+ taskStorage.insert(goodTask0, TaskStatus.running(goodTask0.getId()));
+
+ TaskLockbox testLockbox = new NullLockPosseTaskLockbox(taskStorage,
metadataStorageCoordinator);
+ testLockbox.add(badTask0);
+ testLockbox.add(badTask1);
+ testLockbox.add(goodTask0);
+
+ testLockbox.tryLock(badTask0, new
TimeChunkLockRequest(TaskLockType.EXCLUSIVE,
Review Comment:
Done
--
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]