Skip to content

Adjustment of behaviour of hasXAttributesSatisfying and hasXAttribute… - #4882

Merged
jack-berg merged 5 commits into
open-telemetry:mainfrom
lmonkiewicz:4778-signed-cla
Nov 29, 2022
Merged

Adjustment of behaviour of hasXAttributesSatisfying and hasXAttribute…#4882
jack-berg merged 5 commits into
open-telemetry:mainfrom
lmonkiewicz:4778-signed-cla

Conversation

@lmonkiewicz

@lmonkiewicz lmonkiewicz commented Oct 24, 2022

Copy link
Copy Markdown
Contributor

Adjustment of hasXAttributesSatisfying and hasXAttributesSatisfyingExactly assertions, as described in issue

Closes: #4778

@lmonkiewicz
lmonkiewicz requested a review from a team October 24, 2022 17:20
@codecov

codecov Bot commented Oct 24, 2022

Copy link
Copy Markdown

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

jkwatson commented Nov 3, 2022

Copy link
Copy Markdown
Contributor

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

@lmonkiewicz

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 :)

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

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.

@jkwatson jkwatson left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Ping @trask 🙂

@trask

trask commented Nov 22, 2022

Copy link
Copy Markdown
Member

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

@trask trask left a comment

Copy link
Copy Markdown
Member

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