Skip to content

Commit 85aa287

Browse files
committed
fix IT
Signed-off-by: Lantao Jin <ltjin@amazon.com>
1 parent 4a664fc commit 85aa287

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

opensearch/src/main/java/org/opensearch/sql/opensearch/monitor/OpenSearchResourceMonitor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public OpenSearchResourceMonitor(Settings settings, OpenSearchMemoryHealthy memo
4848
public boolean isHealthy() {
4949
try {
5050
ByteSizeValue limit = settings.getSettingValue(Settings.Key.QUERY_MEMORY_LIMIT);
51+
if (limit == null) {
52+
// undefined, be always healthy, this is useful in Calcite standalone ITs
53+
// since AlwaysHealthyMonitor is not work within Calcite tests.
54+
return true;
55+
}
5156
Supplier<Boolean> booleanSupplier =
5257
Retry.decorateSupplier(retry, () -> memoryMonitor.isMemoryHealthy(limit.getBytes()));
5358
return booleanSupplier.get();

0 commit comments

Comments
 (0)