Skip to content

Commit 4dcc09e

Browse files
committed
Disable integration test on Node 10.
1 parent f5672b6 commit 4dcc09e

File tree

1 file changed

+26
-24
lines changed
  • packages/node-integration-tests/suites/tracing/apollo-graphql

1 file changed

+26
-24
lines changed
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
import { assertSentryTransaction, getEnvelopeRequest, runServer } from '../../../utils';
1+
import { assertSentryTransaction, getEnvelopeRequest, runServer, conditionalTest } from '../../../utils';
22

3-
test('should instrument GraphQL and Apollo Server.', async () => {
4-
const url = await runServer(__dirname);
5-
const envelope = await getEnvelopeRequest(url);
3+
conditionalTest({ min: 12 })(() => {
4+
test('should instrument GraphQL and Apollo Server.', async () => {
5+
const url = await runServer(__dirname);
6+
const envelope = await getEnvelopeRequest(url);
67

7-
expect(envelope).toHaveLength(3);
8+
expect(envelope).toHaveLength(3);
89

9-
const transaction = envelope[2];
10-
const parentSpanId = (transaction as any)?.contexts?.trace?.span_id;
11-
const graphqlSpanId = (transaction as any)?.spans?.[0].span_id;
10+
const transaction = envelope[2];
11+
const parentSpanId = (transaction as any)?.contexts?.trace?.span_id;
12+
const graphqlSpanId = (transaction as any)?.spans?.[0].span_id;
1213

13-
expect(parentSpanId).toBeDefined();
14-
expect(graphqlSpanId).toBeDefined();
14+
expect(parentSpanId).toBeDefined();
15+
expect(graphqlSpanId).toBeDefined();
1516

16-
assertSentryTransaction(transaction, {
17-
transaction: 'test_transaction',
18-
spans: [
19-
{
20-
description: 'execute',
21-
op: 'db.graphql',
22-
parent_span_id: parentSpanId,
23-
},
24-
{
25-
description: 'Query.hello',
26-
op: 'db.graphql.apollo',
27-
parent_span_id: graphqlSpanId,
28-
},
29-
],
17+
assertSentryTransaction(transaction, {
18+
transaction: 'test_transaction',
19+
spans: [
20+
{
21+
description: 'execute',
22+
op: 'db.graphql',
23+
parent_span_id: parentSpanId,
24+
},
25+
{
26+
description: 'Query.hello',
27+
op: 'db.graphql.apollo',
28+
parent_span_id: graphqlSpanId,
29+
},
30+
],
31+
});
3032
});
3133
});

0 commit comments

Comments
 (0)