mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 18:52:48 +00:00
fix: preserve cancellation when change-time settles
This commit is contained in:
1 parent
5bb34ce522
commit
66e85df5c5
2 files changed
+17
-2
No files matched your search
@@ -271,3 +271,17 @@ it("does not consume Windows limits on other hosts and preserves cancellation du
|
||||
),
|
||||
).rejects.toBe(reason);
|
||||
});
|
||||
|
||||
it("preserves cancellation during a Windows read even when the timestamp is stable", async () => {
|
||||
const controller = new AbortController();
|
||||
const reason = new Error("cancelled during read");
|
||||
await expect(
|
||||
settleChangeTimeBaseline(
|
||||
async () => {
|
||||
controller.abort(reason);
|
||||
return statsAt(1);
|
||||
},
|
||||
{ platform: "win32", now: () => 10000, signal: controller.signal },
|
||||
),
|
||||
).rejects.toBe(reason);
|
||||
});
|
||||
Reference in new issue
Block a user