Skip to content

Commit

Permalink
simplify interop-mongo-express (#401)
Browse files Browse the repository at this point in the history
PR-URL: #401
  • Loading branch information
matthewloring authored Feb 22, 2017
1 parent f9a4b7b commit 2cca378
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions test/hooks/test-hooks-interop-mongo-express.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -39,22 +31,17 @@ 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) {
assert(error.indexOf('mongo') === -1, error);
});
});

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) {
Expand Down

0 comments on commit 2cca378

Please sign in to comment.