Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ public void toxiProxyTest() throws Exception {

// Scenario 1: proxy disabled — simulates a sustained network partition
proxy.disable();
// Dedicated thread: this blocks in dbRetry while the proxy is down, and must

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run this test @isolated and/or @execution(ExecutionMode.SAME_THREAD)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thread would have supplyAsync run on the same coomon pool and isolated slows down test without really solving the problem

// not pin a common ForkJoinPool worker (starves unrelated tests' callbacks).
var wf1 =
CompletableFuture.supplyAsync(
() -> dbos.startWorkflow(() -> svc.dbLossBetweenSteps()));
() -> dbos.startWorkflow(() -> svc.dbLossBetweenSteps()),
r -> new Thread(r, "chaos-wf1").start());
Thread.sleep(3000);
proxy.enable();
assertEquals("Hehehe", wf1.get(10, TimeUnit.SECONDS).getResult());
Expand Down