Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/firefox/bidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export class BiDiFacade extends EventEmitter<FirefoxEventMap> {
/**
* Wait for WebSocket to be in OPEN state
*/
private async waitForWebSocketOpen(ws: any, timeout: number = 5000): Promise<void> {
private async waitForWebSocketOpen(ws: any, timeout: number = 30000): Promise<void> {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only non-test change. Maybe 30s is excessive in general and should be reserved for CI jobs known to run on slow workers?

// Already open
if (ws.readyState === 1) {
return;
Expand Down
20 changes: 8 additions & 12 deletions tests/integration/mcp/privileged-context-no-access.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ import { mcpTest } from '../../helpers/mcp.js';
mcpTest.override('mcpServerArgs', ['--tools', 'privileged']);

mcpTest.describe('privileged tools without system access (MCP)', () => {
mcpTest(
'explains how to enable system access',
async ({ mcp }) => {
const result = await mcp.callTool('evaluate_privileged_script', {
function: '() => 1',
context: 'unknown',
});
mcpTest('explains how to enable system access', async ({ mcp }) => {
const result = await mcp.callTool('evaluate_privileged_script', {
function: '() => 1',
context: 'unknown',
});

expect(result.isError).toBe(true);
expect(result.text).toContain('MOZ_REMOTE_ALLOW_SYSTEM_ACCESS');
},
10000
);
expect(result.isError).toBe(true);
expect(result.text).toContain('MOZ_REMOTE_ALLOW_SYSTEM_ACCESS');
});
});
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export default defineConfig({
setupFiles: ['./tests/setup.ts'],
// Firefox startup can be slow on CI runners, especially the first launch
hookTimeout: 120000,
// Tests which start or restart Firefox can take more than the 5 seconds
// default, especially on Windows CI runners
testTimeout: 30000,
// Run tests sequentially to avoid Firefox port conflicts
fileParallelism: false,
pool: 'forks',
Expand Down