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

[TEST] Fix compiling problem and removed -DENABLE_TEST #2401

Merged
merged 6 commits into from
Nov 11, 2023

Conversation

owent
Copy link
Member

@owent owent commented Nov 10, 2023

Fixes #2400

Changes

  • Fix compiling problem and removed -DENABLE_TEST

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@owent owent requested a review from a team November 10, 2023 07:27
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #2401 (f219722) into main (86ee886) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2401   +/-   ##
=======================================
  Coverage   87.43%   87.43%           
=======================================
  Files         199      199           
  Lines        6028     6028           
=======================================
  Hits         5270     5270           
  Misses        758      758           

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

Could the "ENABLE_TEST" logic be removed entirely instead ?

It is only used for http_client_curl.h, which makes it very suspicious.

How about replacing:

HttpClientFactory::CreateNoSend()

with

HttpClientTestFactory::Create()

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

A few build fixes

exporters/otlp/test/otlp_http_exporter_test.cc Outdated Show resolved Hide resolved
exporters/otlp/test/otlp_http_log_record_exporter_test.cc Outdated Show resolved Hide resolved
exporters/otlp/test/otlp_http_metric_exporter_test.cc Outdated Show resolved Hide resolved
@owent
Copy link
Member Author

owent commented Nov 10, 2023

Could the "ENABLE_TEST" logic be removed entirely instead ?

It is only used for http_client_curl.h, which makes it very suspicious.

How about replacing:

HttpClientFactory::CreateNoSend()

with

HttpClientTestFactory::Create()

Good point. -DENABLE_TEST is removed.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the cleanup.

@marcalff marcalff changed the title Fix compiling problem and add test without -DENABLE_TEST [BUILD] Fix compiling problem and removed -DENABLE_TEST Nov 10, 2023
@marcalff marcalff changed the title [BUILD] Fix compiling problem and removed -DENABLE_TEST [TEST] Fix compiling problem and removed -DENABLE_TEST Nov 10, 2023
Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks :)

@marcalff marcalff merged commit 6322607 into open-telemetry:main Nov 11, 2023
44 checks passed
@owent owent deleted the fix_2400 branch November 14, 2023 03:10
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.

Can not compile using bazel without --copt=-DENABLE_TEST
3 participants