Skip to content

Commit

Permalink
test: check for race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ajohn25 committed Aug 11, 2023
1 parent 7cd7433 commit 9870a31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/api/lib/message-sending.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { PoolClient } from "pg";
import { Pool } from "pg";
import { sleep } from "src/lib";
import supertest from "supertest";

import { createOrgAndSession } from "../../../../__test__/lib/session";
Expand Down Expand Up @@ -174,6 +175,7 @@ describe("automatic message handling", () => {
});

await sendReply(agent, testbed.cookies, testbed.contact.id, "YES!");
sleep(5000);
const {
rows: [retryJobs]
} = await pool.query(
Expand Down

0 comments on commit 9870a31

Please sign in to comment.