You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Durable Object alarms are not reset between test runs and do not respect isolated storage. You must delete or run all alarms with runDurableObjectAlarm() scheduled in each test before finishing the test, to ensure rouge alarms don't fire later.
To fix this, we should probably cancel all alarms in the abortAllDurableObjects() function:
This function is called before/after each test when isolatedStorage is enabled, which is when we'd like all alarms to be cancelled. As far as I know, locally workerd uses an in-memory alarm scheduler, so it should be possible to clear these without needing to write to storage.
Currently, Durable Object alarms are not reset between test runs and do not respect isolated storage. You must delete or run all alarms with runDurableObjectAlarm() scheduled in each test before finishing the test, to ensure rouge alarms don't fire later.
To fix this, we should probably cancel all alarms in the
abortAllDurableObjects()
function:https://github.com/cloudflare/workerd/blob/9651cc9b814b20d4674f1b0cba2e83ebbfbc8c38/src/workerd/api/unsafe.c%2B%2B#L102-L107
This function is called before/after each test when
isolatedStorage
is enabled, which is when we'd like all alarms to be cancelled. As far as I know, locallyworkerd
uses an in-memory alarm scheduler, so it should be possible to clear these without needing to write to storage.See https://github.com/cloudflare/workerd/blob/9651cc9b814b20d4674f1b0cba2e83ebbfbc8c38/src/workerd/server/server.c%2B%2B#L2534-L2551 for the
workerd
implementation of the abort all function.The text was updated successfully, but these errors were encountered: