Browse Source

[TEST] throw correct error within assertBusy in TruncateTranslogIT

Lee Hinman 9 years ago
parent
commit
9fa33b6d07

+ 2 - 1
core/src/test/java/org/elasticsearch/index/translog/TruncateTranslogIT.java

@@ -153,7 +153,8 @@ public class TruncateTranslogIT extends ESIntegTestCase {
                         Lock writeLock = dir.obtainLock(IndexWriter.WRITE_LOCK_NAME)) {
                     // Great, do nothing, we just wanted to obtain the lock
                 }  catch (LockObtainFailedException lofe) {
-                    throw new ElasticsearchException("Still waiting for lock release at [" + idxLocation + "]");
+                    logger.info("--> failed acquiring lock for {}", idxLocation);
+                    fail("still waiting for lock release at [" + idxLocation + "]");
                 } catch (IOException ioe) {
                     fail("Got an IOException: " + ioe);
                 }