Skip to content

Commit

Permalink
Disable flaky test until it properly uses thread pool
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Sep 22, 2023
1 parent 1c4f1df commit f594249
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

@ThreadLeakScope(Scope.NONE)
public class ProcessNodeTests extends OpenSearchTestCase {
Expand Down Expand Up @@ -49,11 +48,12 @@ public String getName() {
assertEquals(Collections.emptyList(), nodeA.predecessors());
assertEquals("A", nodeA.toString());

// TODO: Once we can get OpenSearch Thread Pool for this execute method, create an IT and don't test execute here
CompletableFuture<WorkflowData> f = nodeA.execute();
assertEquals(f, nodeA.future());
f.orTimeout(5, TimeUnit.SECONDS);
assertTrue(f.isDone());
assertEquals(WorkflowData.EMPTY, f.get());
// TODO: This test is flaky on Windows. Disabling until thread pool is integrated
// https://github.com/opensearch-project/opensearch-ai-flow-framework/issues/42
// CompletableFuture<WorkflowData> f = nodeA.execute();
// assertEquals(f, nodeA.future());
// f.orTimeout(5, TimeUnit.SECONDS);
// assertTrue(f.isDone());
// assertEquals(WorkflowData.EMPTY, f.get());
}
}

0 comments on commit f594249

Please sign in to comment.