Skip to content

Commit

Permalink
fix: robustify the client test
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed Oct 10, 2024
1 parent 008b347 commit c9e7a47
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ts/test/trycp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,23 @@ test("TryCP Client - shut down", async (t) => {
const client = await createTryCpClient();
const conductor1 = await client.addConductor();
const conductor2 = await client.addConductor();
t.doesNotReject(
await t.doesNotReject(
conductor1.adminWs().generateAgentPubKey,
"conductor 1 responds"
);
t.doesNotReject(
await t.doesNotReject(
conductor2.adminWs().generateAgentPubKey,
"conductor 2 responds"
);
await client.shutDownConductors();
t.rejects(conductor1.adminWs().generateAgentPubKey, "conductor 1 is down");
t.rejects(conductor2.adminWs().generateAgentPubKey, "conductor 2 is down");
await t.rejects(
conductor1.adminWs().generateAgentPubKey,
"conductor 1 is down"
);
await t.rejects(
conductor2.adminWs().generateAgentPubKey,
"conductor 2 is down"
);

await client.cleanUp();
await localTryCpServer.stop();
Expand Down

0 comments on commit c9e7a47

Please sign in to comment.