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

Provides a way to enable/disable the docker integration tests via a gradle property #1115

Merged

Conversation

jkwatson
Copy link
Contributor

Resolves #1067

@jkwatson
Copy link
Contributor Author

@Oberon00 will this work for you?

@codecov-io
Copy link

codecov-io commented Apr 15, 2020

Codecov Report

Merging #1115 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1115   +/-   ##
=========================================
  Coverage     85.68%   85.68%           
  Complexity     1081     1081           
=========================================
  Files           138      138           
  Lines          3974     3974           
  Branches        351      351           
=========================================
  Hits           3405     3405           
- Misses          427      428    +1     
+ Partials        142      141    -1     
Impacted Files Coverage Δ Complexity Δ
...metry/exporters/jaeger/JaegerGrpcSpanExporter.java 60.29% <0.00%> (-2.95%) 4.00% <0.00%> (ø%)
...elemetry/sdk/trace/export/BatchSpansProcessor.java 93.23% <0.00%> (+1.50%) 9.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adf82e7...c9f8e8f. Read the comment docs.

CONTRIBUTING.md Outdated
1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon.
1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon. If
you cannot run the docker daemon, you can disable the docker tests by setting a gradle property of
``"disable.docker.tests"`` to true. See the gradle.properties file in the root of the project
Copy link
Member

Choose a reason for hiding this comment

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

I would do the opposite and disable by default, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also support disabling it by default, and enabling it by default only for CircleCI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no strong opinion. My only concern is that we somehow get it disabled for CI and never notice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally, I like to always run them, so I'll probably just add the property to my personal gradle.properties and be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, reversed the logic and the name of the property (so we don't have double negatives everywhere).

Copy link
Member

Choose a reason for hiding this comment

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

I think enabling by default but skipping the tests without error if container setup fails, unless explicitly enabled, would be best.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So your suggestion is to always try, but only fail if the property is set to true?

@jkwatson jkwatson changed the title Provides a way to disable the docker integration tests via a gradle property Provides a way to enable/disable the docker integration tests via a gradle property Apr 15, 2020
gradle.properties Outdated Show resolved Hide resolved

@Before
public void setupJaegerExporter() {
Assume.assumeNotNull(jaeger);
Copy link
Member

Choose a reason for hiding this comment

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

It is confusing to have this in Before, and probably before is not needed since only one test. I would remove Before from this method and explicitly call it in the only test we have. Then the Assume is only in the test method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented. please take a look

@carlosalberto
Copy link
Contributor

Overall LGTM, no strong opinion on the specific details other than not running/enabling by default the aforementioned test cases.

gradle.properties Outdated Show resolved Hide resolved
@@ -73,6 +73,10 @@ Continuous integration builds the project, runs the tests, and runs multiple
types of static analysis.

1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon.
The tests that require docker are disabled by default. If you wish to run them,
you can enable the docker tests by setting a gradle property of
``"enable.docker.tests"`` to true. See the gradle.properties file in the root of the project
Copy link
Member

Choose a reason for hiding this comment

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

The property name looks a bit odd to me, I'd actually expect it to be the other way round since the periods usually resemble some kind of hierarchy but that's just a nitpick 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I just made something up. I don't feel strongly about it.

jkwatson and others added 2 commits April 16, 2020 09:09
Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
…er/JaegerIntegrationTest.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
jkwatson and others added 2 commits April 16, 2020 09:24
…er/JaegerIntegrationTest.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
@jkwatson
Copy link
Contributor Author

I'm going to merge as-is. If we want to tweak the setup, we can do that as a follow-on.

@jkwatson jkwatson merged commit c32c776 into open-telemetry:master Apr 16, 2020
@jkwatson jkwatson deleted the allow_disabling_docker_tests branch April 16, 2020 22:12
davebarda pushed a commit to davebarda/opentelemetry-java that referenced this pull request Apr 24, 2020
…radle property (open-telemetry#1115)

* Provides a way to disable the docker integration tests via a gradle property.

* switch the property to be the opposite

* add a new make target and let CI use it.

* Update gradle.properties

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* Update exporters/jaeger/src/test/java/io/opentelemetry/exporters/jaeger/JaegerIntegrationTest.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* Update exporters/jaeger/src/test/java/io/opentelemetry/exporters/jaeger/JaegerIntegrationTest.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* simplify the test flow

Co-authored-by: Armin Ruech <armin.ruech@gmail.com>
@jkwatson jkwatson added this to the May Release milestone May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project no longer builds on Windows due to Docker test.
6 participants