Skip to content

Commit

Permalink
parametric(cpp): enable prod and more parametric tests (#2501)
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Mehala authored Jun 1, 2024
1 parent ec5ea51 commit 68fb711
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/run-parametric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ jobs:
with:
name: ${{ inputs.binaries_artifact }}
path: binaries/

- name: Load C++ library binary (skipping release tests, use snapshot instead)
if: ${{ inputs.ci_environment == 'prod' && inputs.library == 'cpp'}}
run: ./utils/scripts/load-binary.sh ${{ inputs.library }}

- name: Run parametric tests (with timeout)
if: ${{ inputs.library == 'java' }}
run: |
Expand Down
11 changes: 2 additions & 9 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,15 @@ tests/:
Test_DsmSNS: missing_feature
Test_DsmSQS: missing_feature
parametric/:
test_dynamic_configuration.py: missing_feature (float DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS not supported)
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: missing_feature
test_otel_api_interoperability.py: irrelevant (library does not implement OpenTelemetry)
test_otel_sdk_interoperability.py: irrelevant (library does not implement OpenTelemetry)
test_otel_span_methods.py: irrelevant (library does not implement OpenTelemetry)
test_span_links.py: missing_feature
test_telemetry.py:
Test_TelemetryInstallSignature: missing_feature
Test_TelemetrySCAEnvVar: missing_feature
test_trace_sampling.py:
Test_Trace_Sampling_Basic: bug
Test_Trace_Sampling_Globs: bug
Test_Trace_Sampling_Globs_Feb2024_Revision: bug (implementation is case-sensitive)
Test_Trace_Sampling_Resource: bug
Test_Trace_Sampling_Tags: bug
Test_Trace_Sampling_Tags_Feb2024_Revision: bug
Test_Trace_Sampling_With_W3C: bug
test_tracer.py:
Test_TracerSCITagging: missing_feature
test_tracer_flare.py:
Expand Down
7 changes: 6 additions & 1 deletion tests/parametric/test_dynamic_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def test_trace_sampling_rate_override_env(self, library_env, test_agent, test_li
}
],
)
@bug(library="cpp", reason="empty service default to '*'")
def test_trace_sampling_rate_with_sampling_rules(self, library_env, test_agent, test_library):
"""Ensure that sampling rules still apply when the sample rate is set via remote config."""
RC_SAMPLING_RULE_RATE = 0.56
Expand Down Expand Up @@ -684,7 +685,11 @@ def test_trace_sampling_rules_override_rate(self, library_env, test_agent, test_
}
],
)
def test_trace_sampling_rules_with_tags(self, library_env, test_agent, test_library):
@bug(
context.library == "cpp",
reason="JSON tag format in RC differs from the JSON tag format used in DD_TRACE_SAMPLING_RULES",
)
def test_trace_sampling_rules_with_tags(self, test_agent, test_library):
"""RC sampling rules with tags should match/skip spans with/without corresponding tag values.
When a sampling rule contains a tag clause/pattern, it should be used to match against a trace/span.
Expand Down
7 changes: 2 additions & 5 deletions tests/parametric/test_headers_tracecontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ def test_tracestate_included_traceparent_missing(self, test_agent, test_library)
expects the tracestate to be discarded
"""
with test_library:
_, tracestate1 = make_single_request_and_get_tracecontext(test_library, [["tracestate", "foo=1"],])
_, tracestate2 = make_single_request_and_get_tracecontext(test_library, [["tracestate", "foo=1,bar=2"],])
_, tracestate1 = make_single_request_and_get_tracecontext(test_library, [["tracestate", "foo=1"],],)
_, tracestate2 = make_single_request_and_get_tracecontext(test_library, [["tracestate", "foo=1,bar=2"],],)

# Updated the test to check that the number of tracestate list-members is the same,
# since Datadog will add an entry.
Expand Down Expand Up @@ -719,7 +719,6 @@ def test_tracestate_duplicated_keys(self, test_agent, test_library):
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library == "java", reason="Not implemented")
@missing_feature(context.library == "cpp", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
def test_tracestate_w3c_p_extract(self, test_agent, test_library):
Expand Down Expand Up @@ -773,7 +772,6 @@ def test_tracestate_w3c_p_extract(self, test_agent, test_library):
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library == "java", reason="Not implemented")
@missing_feature(context.library == "cpp", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
@missing_feature(context.library < "[email protected]", reason="Not implemented")
def test_tracestate_w3c_p_inject(self, test_agent, test_library):
Expand Down Expand Up @@ -805,7 +803,6 @@ def test_tracestate_w3c_p_extract_datadog_w3c(self, test_agent, test_library):
Ensure the last parent id tag is set according to the W3C phase 3 spec
"""
with test_library:

# 1) Trace ids and parent ids in datadog and tracecontext headers match
with test_library.start_span(
name="identical_trace_info",
Expand Down
1 change: 0 additions & 1 deletion tests/parametric/test_trace_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ def test_globs_same_casing(self, test_agent, test_library):
"library_env",
[tag_sampling_env("Foo"), tag_sampling_env("Fo*"), tag_sampling_env("F??"), tag_sampling_env("?O*")],
)
@bug(library="cpp", reason="implementation is case-sensitive")
def test_globs_different_casing(self, test_agent, test_library):
"""Test tag matching with string of matching case"""
with test_library:
Expand Down

0 comments on commit 68fb711

Please sign in to comment.