Skip to content

adding getBooleanAttribute method to data-model(TraceAttributeUtils)#42

Merged
kotharironak merged 4 commits intohypertrace:mainfrom
Vaibhav090420:main
Feb 17, 2023
Merged

adding getBooleanAttribute method to data-model(TraceAttributeUtils)#42
kotharironak merged 4 commits intohypertrace:mainfrom
Vaibhav090420:main

Conversation

@Vaibhav090420
Copy link
Copy Markdown
Contributor

@Vaibhav090420 Vaibhav090420 commented Feb 16, 2023

Description

Please include a summary of the change, motivation and context.

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@Vaibhav090420 Vaibhav090420 requested a review from a team February 16, 2023 06:53
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 16, 2023

Codecov Report

Merging #42 (009e847) into main (4c4ca17) will increase coverage by 1.07%.
The diff coverage is 100.00%.

❗ Current head 009e847 differs from pull request most recent head 4faff26. Consider uploading reports for the commit 4faff26 to get more accurate results

@@             Coverage Diff              @@
##               main      #42      +/-   ##
============================================
+ Coverage     67.23%   68.31%   +1.07%     
- Complexity      125      129       +4     
============================================
  Files            13       13              
  Lines           586      587       +1     
  Branches         96       96              
============================================
+ Hits            394      401       +7     
+ Misses          166      159       -7     
- Partials         26       27       +1     
Flag Coverage Δ
unit 68.31% <100.00%> (+1.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ace/core/datamodel/shared/TraceAttributeUtils.java 39.39% <100.00%> (+20.64%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

singhalprerana
singhalprerana previously approved these changes Feb 16, 2023
.thenReturn(Attributes.newBuilder().setAttributeMap(attributeMap).build());
assertFalse(TraceAttributeUtils.getBooleanAttribute(mockTrace, "someattribute"));

attributeMap.put("someattribute", AttributeValue.newBuilder().setValue("true").build());
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.

Can you add test case for negetive case and see if its not throwing any exception?

attributeMap.put("someattribute", AttributeValue.newBuilder().setValue("xyz").build());

attributeMap.put("someattribute", AttributeValue.newBuilder().setValue("").build());

@kotharironak kotharironak merged commit fc8737a into hypertrace:main Feb 17, 2023
@github-actions
Copy link
Copy Markdown

Unit Test Results

  9 files  ±0    9 suites  ±0   1s ⏱️ -1s
24 tests +2  24 ✔️ +2  0 💤 ±0  0 ❌ ±0 

Results for commit fc8737a. ± Comparison against base commit 4c4ca17.

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.

3 participants