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

Bean name matching logic: OR→AND #77

Closed
wants to merge 5 commits into from

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented Oct 16, 2015

matchBeanName was incorrectly reporting true as soon as one
bean parameter in a configuration was matching and regardless of the
others.
To sum up, fix bean parameters matching logic: ORAND

Support 'float' and 'java.lang.Float' attribute types as simple JMX
attrbutes.
Introduce a `TestCommon` parent class to refactor JUnit tests.
Features:
* One-liner `registerMBean` method
* One-liner `initApplication` nethod
* Automatically unregister MBeans after execution of every test
* More eye candies
Add two new methods to `TestCommon` test class to refactor JUnit tests.
* `assertMetric`: assert that a specific metric was collected
* `assertCoverage`: assert that all -excluding JVM related- metrics were
tested.

Refactor `TestApp` tests.
Assert `java.lang.Float` attribute type support.
`matchBeanName` was incorrectly reporting `true` as soon as one
bean parameter in a configuration was matching and regardless of the
others.
To sum up, fix bean parameters matching logic: `OR`→`AND`
@yannmh yannmh self-assigned this Oct 16, 2015
assertMetric("test.boolean", 1.0, commonTags, 5);
assertMetric("test.defaulted", 32.0, commonTags, 5);
assertMetric("subattr.this.is.0", 0.0, commonTags, 5);
assertMetric("subattr.this.is.0", 0.0, commonTags, 5);
Copy link
Member

Choose a reason for hiding this comment

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

Duped line.

@yannmh
Copy link
Member Author

yannmh commented Oct 28, 2015

Fixed the duped @truthbk, thanks.
I am closing in favor of #81

@yannmh yannmh closed this Oct 28, 2015
@yannmh yannmh deleted the yann/fix-bad-bean-matching branch October 28, 2015 22:48
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.

2 participants