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
8 changes: 7 additions & 1 deletion test/mp/test/connect_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ KJ_TEST("ConnectStream defers disconnect failure to the first IPC request for in
} catch (const std::runtime_error& e) {
std::string_view reason = e.what();

KJ_EXPECT(reason == "IPC client method called after disconnect.");
// There is a race between the event loop detecting the disconnect
// and foo->add() being called. If the onDisconnect callback fires
// first and nulls m_context.connection, the error is "called after
// disconnect"; if foo->add() submits before the callback fires,
// the error is "interrupted by disconnect".
KJ_EXPECT(reason == "IPC client method called after disconnect." ||
reason == "IPC client method call interrupted by disconnect.");
}
}

Expand Down
Loading