Skip to content

Commit 4dc6d07

Browse files
committed
wait until the transport is set up
1 parent 5438817 commit 4dc6d07

File tree

1 file changed

+3
-3
lines changed
  • dev-packages/e2e-tests/test-applications/node-express/tests

1 file changed

+3
-3
lines changed

dev-packages/e2e-tests/test-applications/node-express/tests/mcp.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ test('Should record transactions for mcp handlers', async ({ baseURL }) => {
1212
});
1313

1414
await client.connect(transport);
15-
15+
// waith for the SSE connection to be established in CI.
16+
await new Promise(resolve => setTimeout(resolve, 3000));
1617
await test.step('tool handler', async () => {
1718
const postTransactionPromise = waitForTransaction('node-express', transactionEvent => {
1819
return transactionEvent.transaction === 'POST /messages';
@@ -45,8 +46,7 @@ test('Should record transactions for mcp handlers', async ({ baseURL }) => {
4546
expect(toolTransaction).toBeDefined();
4647
expect(toolTransaction.contexts?.trace?.op).toEqual('mcp.server');
4748
expect(toolTransaction.contexts?.trace?.data?.['mcp.method.name']).toEqual('tools/call');
48-
// TODO: When https://github.com/modelcontextprotocol/typescript-sdk/pull/358 is released check for trace id equality between the post transaction and the handler transaction
49-
49+
// TODO: When https://github.com/modelcontextprotocol/typescript-sdk/pull/358 is released check for trace id equality between the post transaction and the handler transaction
5050
});
5151

5252
await test.step('resource handler', async () => {

0 commit comments

Comments
 (0)