Skip to content

Commit 269e08e

Browse files
committed
test(rivetkit): relax sqlite sleep fixture timing
1 parent 7072a94 commit 269e08e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { actor } from "rivetkit";
22
import { db } from "@/common/database/mod";
33
import { scheduleActorSleep } from "./schedule-sleep";
44

5+
const SLEEP_GRACE_PERIOD_MS = 50;
6+
57
function firstRowValue(row: Record<string, unknown> | undefined): unknown {
68
if (!row) {
79
return undefined;
@@ -341,6 +343,7 @@ export const dbActorRaw = actor({
341343
},
342344
options: {
343345
actionTimeout: 120_000,
344-
sleepTimeout: 100,
346+
sleepGracePeriod: SLEEP_GRACE_PERIOD_MS,
347+
sleepTimeout: 1_000,
345348
},
346349
});

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { actor } from "rivetkit";
22
import { db } from "@/common/database/mod";
33

4+
const SLEEP_GRACE_PERIOD_MS = 50;
5+
46
export const dbPragmaMigrationActor = actor({
57
state: {},
68
db: db({
@@ -69,6 +71,7 @@ export const dbPragmaMigrationActor = actor({
6971
},
7072
options: {
7173
actionTimeout: 120_000,
72-
sleepTimeout: 100,
74+
sleepGracePeriod: SLEEP_GRACE_PERIOD_MS,
75+
sleepTimeout: 1_000,
7376
},
7477
});

0 commit comments

Comments
 (0)