Skip to content

Commit dc94696

Browse files
SimenBlegendecaspichlermarc
authored
chore: remove handling of node versions 8, 9 and 10 in tests (#3696)
Co-authored-by: Chengzhong Wu <[email protected]> Co-authored-by: Marc Pichler <[email protected]>
1 parent 8c78859 commit dc94696

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import {
3535
} from '@opentelemetry/semantic-conventions';
3636
import * as assert from 'assert';
3737
import * as fs from 'fs';
38-
import * as semver from 'semver';
3938
import * as nock from 'nock';
4039
import * as path from 'path';
4140
import { HttpInstrumentation } from '../../src/http';
@@ -548,15 +547,7 @@ describe('HttpsInstrumentation', () => {
548547
assert.fail();
549548
} catch (error) {
550549
const spans = memoryExporter.getFinishedSpans();
551-
/**
552-
* There is an edge case with node 8 because the https module
553-
* just call the http one, resulting in 2 span. The fix only works
554-
* if the protocol is 'https:' resulting in 2 span only for this test.
555-
*/
556-
assert.strictEqual(
557-
spans.length,
558-
semver.gt(process.version, '9.0.0') ? 1 : 2
559-
);
550+
assert.strictEqual(spans.length, 1);
560551
}
561552
});
562553

packages/opentelemetry-context-async-hooks/test/AsyncHooksContextManager.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ for (const contextManagerClass of [
3535
| AsyncHooksContextManager
3636
| AsyncLocalStorageContextManager;
3737

38-
before(function () {
39-
if (
40-
contextManagerClass.name === 'AsyncLocalStorageContextManager' &&
41-
(process.version.startsWith('v8.') ||
42-
process.version.startsWith('v10.'))
43-
) {
44-
this.skip();
45-
}
46-
});
47-
4838
beforeEach(() => {
4939
contextManager = new contextManagerClass();
5040
contextManager.enable();

0 commit comments

Comments
 (0)