mirror of
https://github.com/apache/rocketmq.git
synced 2026-08-28 20:09:14 +08:00
This commit is contained in:
@@ -78,9 +78,11 @@ public class AdaptiveLockTest {
|
||||
}
|
||||
assertTrue(adaptiveLock.getAdaptiveLock() instanceof BackOffReentrantLock);
|
||||
|
||||
adaptiveLock.lock();
|
||||
Thread.sleep(1000);
|
||||
adaptiveLock.unlock();
|
||||
for (int i = 0; i <= 2; i++) {
|
||||
adaptiveLock.lock();
|
||||
adaptiveLock.unlock();
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
assertTrue(adaptiveLock.getAdaptiveLock() instanceof BackOffSpinLock);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user