Skip to content

Commit 9fa33b6

Browse files
committed
[TEST] throw correct error within assertBusy in TruncateTranslogIT
1 parent dcf42b8 commit 9fa33b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/test/java/org/elasticsearch/index/translog/TruncateTranslogIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ public void testCorruptTranslogTruncation() throws Exception {
153153
Lock writeLock = dir.obtainLock(IndexWriter.WRITE_LOCK_NAME)) {
154154
// Great, do nothing, we just wanted to obtain the lock
155155
} catch (LockObtainFailedException lofe) {
156-
throw new ElasticsearchException("Still waiting for lock release at [" + idxLocation + "]");
156+
logger.info("--> failed acquiring lock for {}", idxLocation);
157+
fail("still waiting for lock release at [" + idxLocation + "]");
157158
} catch (IOException ioe) {
158159
fail("Got an IOException: " + ioe);
159160
}

0 commit comments

Comments
 (0)