-
Notifications
You must be signed in to change notification settings - Fork 109
fix: don't execute cleanup code if setup failed #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7971332
4b67d43
2c30606
3e65705
ef45fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,17 +168,28 @@ describe.skipIf(process.platform !== "linux")("ConnectionManager OIDC Tests", as | |
}; | ||
}; | ||
|
||
const status: ConnectionStatus = await vi.waitFor(async () => { | ||
const result: ConnectionStatus = (await state.serviceProvider.runCommand("admin", { | ||
connectionStatus: 1, | ||
})) as unknown as ConnectionStatus; | ||
|
||
if (!result) { | ||
throw new Error("Status can not be undefined. Retrying."); | ||
} | ||
|
||
return result; | ||
}); | ||
const status: ConnectionStatus = await vi.waitFor( | ||
async () => { | ||
const result = (await state.serviceProvider.runCommand("admin", { | ||
connectionStatus: 1, | ||
})) as unknown as ConnectionStatus | undefined; | ||
|
||
if (!result) { | ||
throw new Error("Status can not be undefined. Retrying."); | ||
} | ||
|
||
if (!result.authInfo.authenticatedUsers.length) { | ||
throw new Error("No authenticated users found. Retrying."); | ||
} | ||
|
||
if (!result.authInfo.authenticatedUserRoles.length) { | ||
throw new Error("No authenticated user roles found. Retrying."); | ||
} | ||
|
||
return result; | ||
}, | ||
{ timeout: 5000 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @kmruiz - I expanded this a bit as the test was failing due to the Here's a run where we're only checking status: https://github.com/mongodb-js/mongodb-mcp-server/actions/runs/17266097331/job/48998448665?pr=483 Here's the one that's failing with the 1 second default: https://github.com/mongodb-js/mongodb-mcp-server/actions/runs/17267312116/job/49002419896?pr=483 |
||
); | ||
|
||
expect(status.authInfo.authenticatedUsers[0]).toEqual({ | ||
user: "dev/testuser", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @himanshusinghs - not sure what has happened here - I think I added the titles at some point, then they disappeared 😬 But looking at the results on main, it seems the accuracy tests are failing because of this.