From c6960c25bedca9a42e3c2d91c5554ef2619d5776 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Mon, 13 May 2024 09:23:36 +0800 Subject: [PATCH] Add log for ShardLockException Signed-off-by: Hailong Cui --- .../src/main/java/org/opensearch/test/InternalTestCluster.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java index ca80c65e58522..cd50699c76884 100644 --- a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java @@ -2770,6 +2770,7 @@ public synchronized void assertAfterTest() throws Exception { try { env.shardLock(id, "InternalTestCluster assert after test", TimeUnit.SECONDS.toMillis(5)).close(); } catch (ShardLockObtainFailedException ex) { + logger.error("Obtained shard lock failed", ex); fail("Shard " + id + " is still locked after 5 sec waiting"); } }