Skip to content

Replace Mongo tests with updated tests.#871

Merged
tylerbenson merged 4 commits intomasterfrom
tyler/update-mongo-tests
Jun 13, 2019
Merged

Replace Mongo tests with updated tests.#871
tylerbenson merged 4 commits intomasterfrom
tyler/update-mongo-tests

Conversation

@tylerbenson
Copy link
Contributor

I think these were the last remaining "legacy" integration tests!

Done in preparation for changes to Mongo instrumentation.

@tylerbenson tylerbenson requested a review from a team as a code owner June 12, 2019 01:43
@tylerbenson tylerbenson force-pushed the tyler/update-mongo-tests branch from d6a97f8 to de77685 Compare June 12, 2019 23:14
@tylerbenson tylerbenson force-pushed the tyler/update-mongo-tests branch from 1c978c3 to 75b626a Compare June 13, 2019 17:59

import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace

@Timeout(10)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like adding timeouts when making blocking calls and it was cleaner to add it once here than on each get() below.

testCompile group: 'org.assertj', name: 'assertj-core', version: '2.9.+'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.19.0'
testCompile project(':dd-java-agent:instrumentation:mongo').sourceSets.test.output
testCompile group: 'de.flapdoodle.embed', name: 'de.flapdoodle.embed.mongo', version: '1.50.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider using mongo container instead? just and idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've heard other tracers have had bad luck with it. This seemed to be pretty reliable, so I didn't want to fuss with it.

Copy link
Contributor

@mar-kolya mar-kolya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, couple of comments.

@tylerbenson tylerbenson merged commit 51d552a into master Jun 13, 2019
@tylerbenson tylerbenson deleted the tyler/update-mongo-tests branch June 13, 2019 21:33
@tylerbenson tylerbenson added this to the 0.30.0 milestone Jun 14, 2019
@tylerbenson tylerbenson added the inst: others All other instrumentations label Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants