Skip to content

Commit 70ad62a

Browse files
committed
test(rivetkit): verify cached websocket db refs exceed grace
1 parent a877360 commit 70ad62a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

rivetkit-typescript/packages/rivetkit/fixtures/driver-test-suite/sleep-db.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,10 @@ export const sleepWsConcurrentDbExceedsGrace = actor({
12731273
// After the delay, the VFS may be destroyed.
12741274
const dbRef = c.db;
12751275

1276+
await dbRef.execute(
1277+
`INSERT INTO sleep_log (event, created_at) VALUES ('handler-${index}-start', ${Date.now()})`,
1278+
);
1279+
12761280
ws.send(JSON.stringify({ type: "started", index }));
12771281

12781282
// Stagger the delay slightly per index so handlers resume at

rivetkit-typescript/packages/rivetkit/tests/driver/actor-sleep-db.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,7 @@ describeDriverMatrix("Actor Sleep Db", (driverTestConfig) => {
10141014
{ timeout: 15_000 },
10151015
);
10161016

1017-
// TODO(#4705): Root-cause task-model shutdown ordering for concurrent WebSocket DB handlers and re-enable this coverage.
1018-
test.skip(
1017+
test(
10191018
"concurrent ws handlers with cached db ref get errors when grace period exceeded",
10201019
async (c) => {
10211020
const { client } = await setupDriverTest(c, driverTestConfig);

0 commit comments

Comments
 (0)