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

simplify interop-mongo-express #401

Merged
merged 1 commit into from
Feb 22, 2017
Merged
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
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