From aa26e4297cb757a203ce8d53b9b8b0649ab98a15 Mon Sep 17 00:00:00 2001 From: Matt Loring Date: Sat, 18 Feb 2017 18:52:56 -0800 Subject: [PATCH] simplify interop-mongo-express --- test/hooks/test-hooks-interop-mongo-express.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/test/hooks/test-hooks-interop-mongo-express.js b/test/hooks/test-hooks-interop-mongo-express.js index b718e10f9..1fb135282 100644 --- a/test/hooks/test-hooks-interop-mongo-express.js +++ b/test/hooks/test-hooks-interop-mongo-express.js @@ -22,14 +22,6 @@ // ex) docker run -p 27017:27017 -d mongo var common = require('./common.js'); -// TODO: Determine why this test succeeds but causes the -// test-trace-express.js test to fail if either of -// (1) or (2) are changed below. - -// (1) express needs to be required before the agent is -// started for this test and test-trace-express.js -// to both pass. -var express = require('./fixtures/express4'); var assert = require('assert'); var http = require('http'); @@ -39,8 +31,10 @@ describe('mongodb + express', function() { var agent; var oldDebug; var mongoose; + var express; before(function() { agent = require('../..').start(); + express = require('./fixtures/express4'); mongoose = require('./fixtures/mongoose4'); oldDebug = common.replaceDebugLogger(agent, function(error) { @@ -48,13 +42,6 @@ describe('mongodb + express', function() { }); }); - after(function() { - // (2) express needs to be deleted from the require cache - // for this test and test-trace-express.js to both - // pass. - delete require.cache[require.resolve('./fixtures/express4')]; - }); - it('should not lose context on startup', function(done) { var app = express(); app.get('/', function (req, res) {