diff --git a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java index 01090b1fc..3d3da5cc3 100644 --- a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java +++ b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java @@ -197,8 +197,6 @@ protected void loadModel(String modelId) throws Exception { isComplete = checkComplete(taskQueryResult); Thread.sleep(DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND); } - - pollForModelState(modelId, Set.of(MLModelState.DEPLOYED)); } /** @@ -893,7 +891,7 @@ protected Set findDeployedModels() { List> innerHitsMap = (List>) hits.get("hits"); return innerHitsMap.stream() .map(hit -> (Map) hit.get("_source")) - .filter(hitsMap -> !Objects.isNull(hitsMap) && hitsMap.containsKey("model_id")) + .filter(hitsMap -> Objects.nonNull(hitsMap) && hitsMap.containsKey("model_id")) .map(hitsMap -> (String) hitsMap.get("model_id")) .collect(Collectors.toSet()); }