Skip to content

Commit

Permalink
chore: remove handling of node versions 8, 9 and 10 in tests (#3696)
Browse files Browse the repository at this point in the history
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
  • Loading branch information
3 people authored Mar 28, 2023
1 parent 8c78859 commit dc94696
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
} from '@opentelemetry/semantic-conventions';
import * as assert from 'assert';
import * as fs from 'fs';
import * as semver from 'semver';
import * as nock from 'nock';
import * as path from 'path';
import { HttpInstrumentation } from '../../src/http';
Expand Down Expand Up @@ -548,15 +547,7 @@ describe('HttpsInstrumentation', () => {
assert.fail();
} catch (error) {
const spans = memoryExporter.getFinishedSpans();
/**
* There is an edge case with node 8 because the https module
* just call the http one, resulting in 2 span. The fix only works
* if the protocol is 'https:' resulting in 2 span only for this test.
*/
assert.strictEqual(
spans.length,
semver.gt(process.version, '9.0.0') ? 1 : 2
);
assert.strictEqual(spans.length, 1);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ for (const contextManagerClass of [
| AsyncHooksContextManager
| AsyncLocalStorageContextManager;

before(function () {
if (
contextManagerClass.name === 'AsyncLocalStorageContextManager' &&
(process.version.startsWith('v8.') ||
process.version.startsWith('v10.'))
) {
this.skip();
}
});

beforeEach(() => {
contextManager = new contextManagerClass();
contextManager.enable();
Expand Down

0 comments on commit dc94696

Please sign in to comment.