[Feature Request] Log the actual exception for InternalTestCluster shardLock failure #13628
Labels
enhancement
Enhancement or improvement to existing feature or request
flaky-test
Random test failure that succeeds on second run
Other
:test
Adding or fixing a test
Is your feature request related to a problem? Please describe
When i troubleshoot a flaky test of opensearch-project/ml-commons#2436
the error message report test failure as below, it tells that shard [.plugins-ml-config][0] is still locked for somehow, there is no reason/details logged. It's inconvenient to know why the shard is still locked.
OpenSearch/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java
Lines 2769 to 2774 in cd55bca
Describe the solution you'd like
As shared lock will have a detail/reason of why shard been locked, it would be better we log the exception which contains the detail of existing lock and then fail the test case.
OpenSearch/server/src/main/java/org/opensearch/env/NodeEnvironment.java
Lines 728 to 742 in cd55bca
the log should be similar like below,
lock already held for [starting shard]
this is the reason why it still been locked.Related component
Other
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: