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

Adjustment of behaviour of hasXAttributesSatisfying and hasXAttribute… #4882

Merged
merged 5 commits into from Nov 29, 2022

Conversation

lmonkiewicz
Copy link
Contributor

@lmonkiewicz lmonkiewicz commented Oct 24, 2022

Adjustment of hasXAttributesSatisfying and hasXAttributesSatisfyingExactly assertions, as described in issue

Closes: #4778

@lmonkiewicz lmonkiewicz requested a review from a team as a code owner October 24, 2022 17:20
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 90.90% // Head: 91.06% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (6b81f29) compared to base (51ff803).
Patch coverage: 91.66% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4882      +/-   ##
============================================
+ Coverage     90.90%   91.06%   +0.16%     
- Complexity     4803     4832      +29     
============================================
  Files           545      545              
  Lines         14340    14363      +23     
  Branches       1383     1368      -15     
============================================
+ Hits          13036    13080      +44     
+ Misses          897      886      -11     
+ Partials        407      397      -10     
Impacted Files Coverage Δ
...metry/sdk/testing/assertj/AbstractPointAssert.java 91.17% <0.00%> (-8.83%) ⬇️
...emetry/sdk/testing/assertj/LongExemplarAssert.java 24.32% <75.00%> (+9.61%) ⬆️
...metry/sdk/testing/assertj/LogRecordDataAssert.java 100.00% <100.00%> (ø)
.../opentelemetry/sdk/testing/assertj/AssertUtil.java 100.00% <100.00%> (ø)
...etry/sdk/testing/assertj/DoubleExemplarAssert.java 100.00% <100.00%> (ø)
...telemetry/sdk/testing/assertj/EventDataAssert.java 100.00% <100.00%> (ø)
...ntelemetry/sdk/testing/assertj/SpanDataAssert.java 91.11% <100.00%> (-0.20%) ⬇️
...va/io/opentelemetry/exporter/internal/TlsUtil.java 85.93% <0.00%> (-0.34%) ⬇️
...va/io/opentelemetry/sdk/logs/SdkLoggerBuilder.java 100.00% <0.00%> (ø)
...a/io/opentelemetry/sdk/logs/SdkLoggerProvider.java 100.00% <0.00%> (ø)
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jkwatson
Copy link
Contributor

jkwatson commented Nov 3, 2022

@trask I think this was originally your request. Can you review? Thanks!

@lmonkiewicz
Copy link
Contributor Author

How should I update this branch with main? Merge main here, or rebase this one on main and force push?

@jack-berg
Copy link
Member

Merge main branch into this and push please!

public final PointAssertT hasAttributesSatisfyingExactly(
Iterable<AttributeAssertion> assertions) {
AssertUtil.assertAttributesExactly(actual.getAttributes(), assertions);
return myself;
Copy link
Member

Choose a reason for hiding this comment

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

Can you add coverage for the new code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll try to finish this one tomorrow :)

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, but want to ensure this meets @trask's requirements.

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

I'm fine if @trask is ok with this.

@jack-berg
Copy link
Member

Ping @trask 🙂

@trask
Copy link
Member

trask commented Nov 22, 2022

sorry for late reply, I'll look at it this week

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

thx @lmonkiewicz!

comments below are just adding the second (very helpful) sentence across all of the javadocs

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
@jack-berg jack-berg merged commit ac2ba4a into open-telemetry:main Nov 29, 2022
dmarkwat pushed a commit to dmarkwat/opentelemetry-java that referenced this pull request Dec 30, 2022
open-telemetry#4882)

* Adjustment of behaviour of hasXAttributesSatisfying and hasXAttributesSatisfyingExactly assertions

* Cleanup

* Additional test coverage for new assertion method

* Added javadoc on assertions

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
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.

hasAttributesSatisfying vs hasAttributesSatisfyingExactly
5 participants