diff --git a/examples/smoke-test/src/server/registry.ts b/examples/smoke-test/src/server/registry.ts index 44707e2fe..aba83fe18 100644 --- a/examples/smoke-test/src/server/registry.ts +++ b/examples/smoke-test/src/server/registry.ts @@ -1,6 +1,9 @@ import { actor, setup } from "rivetkit"; const counter = actor({ + options: { + sleepTimeout: 500, + }, state: { count: 0, }, diff --git a/examples/smoke-test/src/smoke-test/spawn-actor.ts b/examples/smoke-test/src/smoke-test/spawn-actor.ts index a5a31f5e2..d57e4598d 100644 --- a/examples/smoke-test/src/smoke-test/spawn-actor.ts +++ b/examples/smoke-test/src/smoke-test/spawn-actor.ts @@ -36,6 +36,14 @@ export async function spawnActor({ const counter = client.counter.getOrCreate(key).connect(); await counter.increment(1); await counter.dispose(); + + // Wait for actor to sleep + await new Promise(res => setTimeout(res, 1000)); + + const counter2 = client.counter.getOrCreate(key).connect(); + await counter2.increment(1); + await counter2.dispose(); + succeeded = true; onSuccess(); } catch (error) {