mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-25 01:57:06 +00:00
fix(scheduler): harden scheduled actions and speed limits
- Persist scheduler dispatch markers and retry unacknowledged events across renderer and process restarts. - Fence queue admission, Torrent moves, and permit activation during system actions with an explicit force path. - Preserve Aria2 zero-limit overrides and normalize global limits across startup, queued, retry, and live paths. - Guard scheduler lifecycle races, completion post-actions, settings bindings, and regression coverage.
This commit is contained in:
@@ -250,6 +250,17 @@ describe('useSettingsStore global speed limit persistence', () => {
|
||||
expect(useSettingsStore.getState().globalSpeedLimit).toBe('2M');
|
||||
expect(ipc.invokeCommand).toHaveBeenCalledWith('set_global_speed_limit', { limit: '3M' });
|
||||
});
|
||||
|
||||
it('rejects malformed limits before changing native or local state', async () => {
|
||||
await expect(useSettingsStore.getState().setGlobalSpeedLimit('not-a-rate'))
|
||||
.rejects.toThrow('Global speed limit is invalid');
|
||||
|
||||
expect(ipc.invokeCommand).not.toHaveBeenCalledWith(
|
||||
'set_global_speed_limit',
|
||||
expect.anything()
|
||||
);
|
||||
expect(useSettingsStore.getState().globalSpeedLimit).toBe('2M');
|
||||
});
|
||||
});
|
||||
|
||||
describe('useSettingsStore Torrent overall upload limit persistence', () => {
|
||||
|
||||
Reference in New Issue
Block a user