Skip to content

Commit a4dd3de

Browse files
authored
test(core/httpAuthSchemes): fix test race condition (#8223)
1 parent d4f2aeb commit a4dd3de

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages-internal/core/src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
import { describe, expect, test as it } from "vitest";
1+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
22

33
import { AwsSdkSigV4Signer } from "./AwsSdkSigV4Signer";
44

55
describe(AwsSdkSigV4Signer.name, () => {
6+
beforeEach(() => {
7+
vi.useFakeTimers();
8+
});
9+
10+
afterEach(() => {
11+
vi.useRealTimers();
12+
});
13+
614
it("sets clockSkewCorrected when skew exceeds detection threshold", async () => {
715
const signer = new AwsSdkSigV4Signer();
816
const fiveMinMs = 5 * 60 * 1000;

0 commit comments

Comments
 (0)