Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump tap version #779

Merged
merged 13 commits into from
Jul 21, 2021
Merged
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,145 changes: 1,243 additions & 902 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"ca-gen": "./bin/update-ca-bundle.sh",
"docker-env": "./bin/docker-env-vars.sh",
"docs": "npm ci && jsdoc -c ./jsdoc-conf.json --private -r .",
"integration": "npm run prepare-test && npm run sub-install && time tap --no-esm test/integration/**/**/*.tap.js --timeout=180 --no-coverage",
"integration": "npm run prepare-test && npm run sub-install && time tap test/integration/**/**/*.tap.js --timeout=180 --no-coverage",
"prepare-test": "npm run ca-gen && npm run ssl && npm run docker-env",
"lint": "eslint ./*.js lib test bin",
"public-docs": "npm ci && jsdoc -c ./jsdoc-conf.json --tutorials examples/shim api.js lib/shim/ lib/transaction/handle.js && cp examples/shim/*.png out/",
Expand All @@ -145,9 +145,9 @@
"dependencies": {
"@grpc/grpc-js": "^1.2.11",
"@grpc/proto-loader": "^0.5.6",
"@newrelic/aws-sdk": "^3.1.0",
"@newrelic/koa": "^5.0.0",
"@newrelic/superagent": "^4.0.0",
"@newrelic/aws-sdk": "^4.0.1",
"@newrelic/koa": "^6.0.1",
"@newrelic/superagent": "^5.0.1",
"@tyriar/fibonacci-heap": "^2.0.7",
"async": "^3.2.0",
"concat-stream": "^2.0.0",
Expand All @@ -157,11 +157,11 @@
"semver": "^5.3.0"
},
"optionalDependencies": {
"@newrelic/native-metrics": "^6.0.0"
"@newrelic/native-metrics": "^7.0.1"
},
"devDependencies": {
"@newrelic/proxy": "^2.0.0",
"@newrelic/test-utilities": "^5.1.0",
"@newrelic/test-utilities": "^6.0.0",
"@octokit/rest": "^18.0.15",
"JSV": "~4.0.2",
"architect": "*",
Expand Down Expand Up @@ -192,7 +192,7 @@
"rimraf": "^2.6.3",
"should": "*",
"sinon": "^4.5.0",
"tap": "^14.10.8",
"tap": "^15.0.9",
"temp": "^0.8.1",
"through": "^2.3.6",
"when": "*"
Expand Down
14 changes: 8 additions & 6 deletions test/integration/agent/serverless-harvest.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const helper = require('../../lib/agent_helper')
const tap = require('tap')
const sinon = require('sinon')
const API = require('../../../api')
const util = require('util')

const DESTS = require('../../../lib/config/attribute-filter').DESTINATIONS
const TEST_ARN = 'test:arn'
Expand All @@ -25,7 +26,7 @@ tap.test('Serverless mode harvest', (t) => {

process.env.AWS_EXECUTION_ENV = TEST_EX_ENV

t.beforeEach((done) => {
t.beforeEach(async() => {
logSpy = sinon.spy(fs, 'writeSync')
agent = helper.instrumentMockedAgent({
serverless_mode: {
Expand All @@ -37,15 +38,16 @@ tap.test('Serverless mode harvest', (t) => {
agent.setLambdaArn(TEST_ARN)
agent.setLambdaFunctionVersion(TEST_FUNC_VERSION)

agent.start(done)
const agentStart = util.promisify(agent.start).bind(agent)
await agentStart()
})

t.afterEach((done) => {
t.afterEach(async() => {
logSpy && logSpy.restore()
helper.unloadAgent(agent)
agent.stop((err) => {
done(err)
})

const agentStop = util.promisify(agent.stop).bind(agent)
await agentStop()
})

t.test('simple harvest', (t) => {
Expand Down
12 changes: 4 additions & 8 deletions test/integration/api/custom-attribute-span-propogation.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ tap.test('#addAttribute', (t) => {
let agent = null
let api = null

t.beforeEach((done) => {
t.beforeEach(() => {
agent = helper.loadMockedAgent({
distributed_tracing: {
enabled: true
}
})
api = new API(agent)
done()
})

t.afterEach((done) => {
t.afterEach(() => {
helper.unloadAgent(agent)
done()
})

t.test('should add attribute to current span', (t) => {
Expand Down Expand Up @@ -102,19 +100,17 @@ tap.test('#addCustomSpanAttribute', (t) => {
let agent = null
let api = null

t.beforeEach((done) => {
t.beforeEach(() => {
agent = helper.loadMockedAgent({
distributed_tracing: {
enabled: true
}
})
api = new API(agent)
done()
})

t.afterEach((done) => {
t.afterEach(() => {
helper.unloadAgent(agent)
done()
})

t.test('should not add attribute to transaction', (t) => {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/collector-remote-method.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tap.test('DataSender (callback style) talking to fake collector', (t) => {
return t.end()
}

t.tearDown(() => {
t.teardown(() => {
server.close()
})

Expand Down Expand Up @@ -125,7 +125,7 @@ tap.test('remote method to preconnect', (t) => {
startedCallback(err, this)
})

t.tearDown(() => {
t.teardown(() => {
server.close()
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/config/attribute-cat.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tap.test('Attribute include/exclude configurations', function(t) {
t.plan(tests.length)

var agent = helper.loadMockedAgent()
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
12 changes: 6 additions & 6 deletions test/integration/core/async_hooks-new-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -180,7 +180,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -221,7 +221,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -286,7 +286,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -381,7 +381,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -582,7 +582,7 @@ function setupAgent(t) {
const agent = helper.instrumentMockedAgent({
feature_flag: {await_support: true}
})
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
8 changes: 4 additions & 4 deletions test/integration/core/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -160,7 +160,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -244,7 +244,7 @@ test("the agent's async hook", function(t) {
}
}, 10)

t.tearDown(() => {
t.teardown(() => {
clearInterval(intervalId)
})

Expand Down Expand Up @@ -419,7 +419,7 @@ function setupAgent(t) {
var agent = helper.instrumentMockedAgent({
feature_flag: {await_support: true}
})
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/core/child_process.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ test('should not break removeAllListeners', (t) => {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/core/crypto.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test('scryptSync', (t) => {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/core/dns.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ test('reverse', function(t) {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
6 changes: 3 additions & 3 deletions test/integration/core/fs.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function test(title, options, callback) {
}
options.timeout = 15000 // Allow for a slow file system.
tapTest(title, options, function(t) {
t.tearDown(function() {
t.teardown(function() {
if (++done === tasks) {
process.umask(mask)
}
Expand Down Expand Up @@ -938,8 +938,8 @@ test('watchFile', function(t) {
})

function setupAgent(t) {
const agent = helper.instrumentMockedAgent()
t.tearDown(function() {
var agent = helper.instrumentMockedAgent()
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/core/inspector.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test('inspector', function(t) {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function() {
t.teardown(function() {
helper.unloadAgent(agent)
})

Expand Down
4 changes: 2 additions & 2 deletions test/integration/core/net.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test('connect', function connectTest(t) {
})
})

t.tearDown(function() {
t.teardown(function() {
server.close()
})

Expand Down Expand Up @@ -250,7 +250,7 @@ test('createServer and connect', function createServerTest(t) {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function tearDown() {
t.teardown(function tearDown() {
helper.unloadAgent(agent)
})
return agent
Expand Down
7 changes: 3 additions & 4 deletions test/integration/core/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ var testTransactionState = require(genericTestDir + 'transaction-state')

module.exports = function runTests(flags) {
var RealPromise = global.Promise
tap.afterEach(function(done) {
tap.afterEach(() => {
Promise = global.Promise = RealPromise
done()
})

tap.test('transaction state', function(t) {
Expand Down Expand Up @@ -1056,7 +1055,7 @@ module.exports = function runTests(flags) {
}

var agent = helper.loadTestAgent(t, {feature_flag: flags})
t.tearDown(function() {
t.teardown(function() {
global.Promise = OriginalPromise
})

Expand All @@ -1078,7 +1077,7 @@ module.exports = function runTests(flags) {
util.inherits(WrappedPromise, Promise)
global.Promise = WrappedPromise

t.tearDown(function() {
t.teardown(function() {
global.Promise = OriginalPromise
})

Expand Down
2 changes: 1 addition & 1 deletion test/integration/core/timers.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ tap.test('clearTimeout', function testNextTick(t) {

function setupAgent(t) {
var agent = helper.instrumentMockedAgent()
t.tearDown(function tearDown() {
t.teardown(function tearDown() {
helper.unloadAgent(agent)
})

Expand Down
Loading