Skip to content

Commit fe38463

Browse files
authored
chore: retry the whole test with fixtures in case of error (#684)
1 parent 5a68122 commit fe38463

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/integration/common/connectionManager.oidc.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import type { OIDCMockProviderConfig } from "@mongodb-js/oidc-mock-provider";
1313
import { OIDCMockProvider } from "@mongodb-js/oidc-mock-provider";
1414
import { type TestConnectionManager } from "../../utils/index.js";
1515

16-
const DEFAULT_TIMEOUT = 30_000;
16+
const DEFAULT_TIMEOUT = 60_000;
17+
const DEFAULT_RETRIES = 5;
1718

1819
// OIDC is only supported on Linux servers
1920
describe.skipIf(process.platform !== "linux")("ConnectionManager OIDC Tests", async () => {
@@ -107,13 +108,15 @@ describe.skipIf(process.platform !== "linux")("ConnectionManager OIDC Tests", as
107108
(integration) => {
108109
function oidcIt(name: string, cb: Parameters<OidcIt>[1]): void {
109110
/* eslint-disable vitest/expect-expect */
110-
it(name, { timeout: DEFAULT_TIMEOUT }, async (context) => {
111+
it(name, { timeout: DEFAULT_TIMEOUT, retry: DEFAULT_RETRIES }, async (context) => {
111112
context.skip(
112113
await isCommunityServer(integration),
113114
"OIDC is not supported in MongoDB Community"
114115
);
115116
context.skip(
116-
semver.satisfies(await getServerVersion(integration), "< 7", { includePrerelease: true }),
117+
semver.satisfies(await getServerVersion(integration), "< 7", {
118+
includePrerelease: true,
119+
}),
117120
"OIDC is only supported on MongoDB newer than 7.0"
118121
);
119122

0 commit comments

Comments
 (0)