ZkLockRegistryTests: increase tryLock timeout
https://build.spring.io/browse/INT-AT42SIO-253/
```
java.lang.AssertionError: Should have been able to lock with zookeeper server restarted!
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.springframework.integration.zookeeper.lock.ZkLockRegistryTests.voidLockFailsWhenServerDown(ZkLockRegistryTests.java:339)
```
When we do `testingServer.restart();` we should give more time to let it started on background, therefore increase the next `lock2.tryLock()` to 10 seconds.
**Cherry-pick to 4.3.x and 4.2.x**
(cherry picked from commit 6ffdd5e)
This commit is contained in:
@@ -337,7 +337,7 @@ public class ZkLockRegistryTests extends ZookeeperTestSupport {
|
|||||||
testingServer.restart();
|
testingServer.restart();
|
||||||
|
|
||||||
assertTrue("Should have been able to lock with zookeeper server restarted!",
|
assertTrue("Should have been able to lock with zookeeper server restarted!",
|
||||||
lock2.tryLock(1, TimeUnit.SECONDS));
|
lock2.tryLock(10, TimeUnit.SECONDS));
|
||||||
|
|
||||||
assertTrue("Should have still held lock1", lock1.tryLock(1, TimeUnit.SECONDS));
|
assertTrue("Should have still held lock1", lock1.tryLock(1, TimeUnit.SECONDS));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user