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**
This commit is contained in:
Artem Bilan
2016-08-23 11:01:47 -04:00
parent 4f4bb18157
commit 6ffdd5eee3

View File

@@ -337,7 +337,7 @@ public class ZkLockRegistryTests extends ZookeeperTestSupport {
testingServer.restart();
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));