This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch fix_UserLockInfo_concurrency
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/fix_UserLockInfo_concurrency 
by this push:
     new c0641fdc6e9 spotless
c0641fdc6e9 is described below

commit c0641fdc6e99bda215e01d621d5ee9ee2cadcfca
Author: Tian Jiang <[email protected]>
AuthorDate: Sat Oct 11 17:17:09 2025 +0800

    spotless
---
 .../apache/iotdb/db/auth/LoginLockManagerTest.java | 33 ++++++++++++----------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/auth/LoginLockManagerTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/auth/LoginLockManagerTest.java
index ba4c812efd7..650d88c8690 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/auth/LoginLockManagerTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/auth/LoginLockManagerTest.java
@@ -19,20 +19,21 @@
 
 package org.apache.iotdb.db.auth;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
 import org.apache.iotdb.db.auth.LoginLockManager.UserLockInfo;
+
 import org.junit.Before;
 import org.junit.Test;
 
 import java.lang.reflect.Field;
 import java.net.InetAddress;
+import java.util.ArrayList;
 import java.util.Deque;
+import java.util.List;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import static org.junit.Assert.assertEquals;
@@ -551,15 +552,17 @@ public class LoginLockManagerTest {
     ExecutorService executor = Executors.newFixedThreadPool(numThreads);
     List<Future<Void>> threads = new ArrayList<>(numThreads);
     for (int i = 0; i < numThreads; i++) {
-      threads.add(executor.submit(() -> {
-        for (int i1 = 0; i1 < numAttempts; i1++) {
-          userLockInfo.addFailureTime(i1);
-          if (i1 > 30) {
-            userLockInfo.removeOldFailures(i1 - 30);
-          }
-        }
-        return null;
-      }));
+      threads.add(
+          executor.submit(
+              () -> {
+                for (int i1 = 0; i1 < numAttempts; i1++) {
+                  userLockInfo.addFailureTime(i1);
+                  if (i1 > 30) {
+                    userLockInfo.removeOldFailures(i1 - 30);
+                  }
+                }
+                return null;
+              }));
     }
     for (Future<Void> thread : threads) {
       thread.get();

Reply via email to