Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

test: BigDecmialByteStringConverter E2E Test#979

Merged
stephaniewang526 merged 14 commits intogoogleapis:masterfrom
JacobStocklass:jstocklass-BigDecimal-e2e
Apr 6, 2021
Merged

test: BigDecmialByteStringConverter E2E Test#979
stephaniewang526 merged 14 commits intogoogleapis:masterfrom
JacobStocklass:jstocklass-BigDecimal-e2e

Conversation

@JacobStocklass
Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

@JacobStocklass JacobStocklass requested review from a team and tswast March 31, 2021 20:20
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. label Mar 31, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 31, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2021

Codecov Report

Merging #979 (bee66d3) into master (235ce1d) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #979      +/-   ##
============================================
+ Coverage     80.99%   81.03%   +0.04%     
- Complexity     1043     1046       +3     
============================================
  Files            78       78              
  Lines          5657     5669      +12     
  Branches        433      436       +3     
============================================
+ Hits           4582     4594      +12     
  Misses          889      889              
  Partials        186      186              
Impacted Files Coverage Δ Complexity Δ
...torage/v1beta2/BQTableSchemaToProtoDescriptor.java 98.48% <100.00%> (ø) 8.00 <0.00> (ø)
...d/bigquery/storage/v1beta2/JsonToProtoMessage.java 97.12% <100.00%> (+0.27%) 47.00 <0.00> (+3.00)
...google/cloud/bigquery/storage/v1alpha2/Waiter.java 55.95% <0.00%> (ø) 12.00% <0.00%> (ø%)
...e/cloud/bigquery/storage/v1alpha2/WriterCache.java 94.25% <0.00%> (ø) 14.00% <0.00%> (ø%)
.../cloud/bigquery/storage/v1alpha2/DirectWriter.java 77.55% <0.00%> (ø) 6.00% <0.00%> (ø%)
.../cloud/bigquery/storage/v1alpha2/StreamWriter.java 80.39% <0.00%> (ø) 34.00% <0.00%> (ø%)
...oud/bigquery/storage/v1alpha2/JsonWriterCache.java 91.07% <0.00%> (ø) 12.00% <0.00%> (ø%)
...ud/bigquery/storage/v1alpha2/JsonStreamWriter.java 77.19% <0.00%> (ø) 12.00% <0.00%> (ø%)
.../bigquery/storage/v1alpha2/JsonToProtoMessage.java 96.96% <0.00%> (ø) 47.00% <0.00%> (ø%)
...bigquery/storage/v1alpha2/SchemaCompatibility.java 91.30% <0.00%> (ø) 99.00% <0.00%> (ø%)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 235ce1d...bee66d3. Read the comment docs.

@JacobStocklass
Copy link
Copy Markdown
Contributor Author

@yirutang PTAL

Copy link
Copy Markdown
Contributor

@yirutang yirutang left a comment

Choose a reason for hiding this comment

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

Looks good, some comments here.

@JacobStocklass
Copy link
Copy Markdown
Contributor Author

@yirutang PTAL

.put(RepeatedObject.getDescriptor(), "object")
.build();

private static ImmutableMap<Descriptor, Message[]> BytesRepeatedCorrectProto =
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.

Could you add this case directly to AllTypesToDebugMessageTest?

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.

I was messing with that for a while but I think your comment below actually kind of solves the issue I was having with it. I just added in the positive test to the AllRepeatedTypesToDebugmessageTest and it works now. I will see if the negative test can also be added in now.

"Error: root.test_repeated[0] could not be converted to byte[].", e.getMessage());
}
}
if (entry.getKey() == RepeatedBytes.getDescriptor()) {
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.

does this test have 2 cases? I only see one entry in the ByteRepeatedTypesToDebugMessageTest. It is quite hard to read. Could you just add the positive case to the AllTypesToDebugMessageTest and then focus on the negative test here?

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.

I realized that there was a better way to add in both of the positive and negative tests to the existing test. It should be covered now and much easier to understand what changes I made

@stephaniewang526 stephaniewang526 merged commit 5c8c4e7 into googleapis:master Apr 6, 2021
shubhwip pushed a commit to shubhwip/java-bigquerystorage that referenced this pull request Oct 7, 2023
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants