adoroszlai commented on code in PR #8446:
URL: https://github.com/apache/ozone/pull/8446#discussion_r2098659416


##########
hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/om/lock/TestOzoneManagerLock.java:
##########
@@ -115,6 +118,26 @@ void testLockingOrder() {
     }
   }
 
+  @ParameterizedTest
+  @EnumSource
+  public void testFlatLockWithParallelResource(FlatResource flatResource) {
+    OzoneManagerLock lock = new OzoneManagerLock(new OzoneConfiguration());
+    List<Resource> resources = new ArrayList<>();
+    
resources.addAll(Arrays.stream(LeveledResource.values()).collect(Collectors.toList()));
+    
resources.addAll(Arrays.stream(FlatResource.values()).collect(Collectors.toList()));
+    for (Resource otherResource : resources) {
+      String[] otherResourceName = generateResourceName(otherResource);
+      String[] flatResourceName = generateResourceName(flatResource);
+      lock.acquireWriteLock(otherResource, otherResourceName);
+      try {
+        lock.acquireWriteLock(flatResource, flatResourceName);

Review Comment:
   Timeout is set globally via config:
   
   
https://github.com/apache/ozone/blob/435fe7e241f7f5072fe3f411ddaf2daa9d4283a8/pom.xml#L2322
   
   Add annotation only if you need much shorter value.



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