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

fix: Add special type tests for Json writer and fix some type mapping issues #725

Merged
merged 14 commits into from Dec 11, 2020

Conversation

yirutang
Copy link
Contributor

@yirutang yirutang commented Dec 11, 2020

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> ☕️

@yirutang yirutang requested review from as code owners Dec 11, 2020
@yirutang yirutang requested a review from pmakani Dec 11, 2020
@product-auto-label product-auto-label bot added the api: bigquerystorage label Dec 11, 2020
@google-cla google-cla bot added the cla: yes label Dec 11, 2020
JSONObject testStr = new JSONObject();
testStr.put("test_str", "aaa");
JSONObject testNumerics = new JSONObject();
testNumerics.put("test_numerics", new JSONArray(new String[]{"123.4", "-9000000"}));
Copy link
Contributor

@yoshi-code-bot yoshi-code-bot Dec 11, 2020

Choose a reason for hiding this comment

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

Suggested change
testNumerics.put("test_numerics", new JSONArray(new String[]{"123.4", "-9000000"}));
testNumerics.put("test_numerics", new JSONArray(new String[] {"123.4", "-9000000"}));

@yirutang yirutang changed the title fix: Add special type tests for Json writer. fix: Add special type tests for Json writer and fix some type mapping issues. Dec 11, 2020
@yirutang yirutang changed the title fix: Add special type tests for Json writer and fix some type mapping issues. fix: Add special type tests for Json writer and fix some type mapping issues Dec 11, 2020
@stephaniewang526
Copy link
Member

@stephaniewang526 stephaniewang526 commented Dec 11, 2020

Some unit tests are failing -- they need to be updated:

Error:  Failures: 
Error:    BQTableSchemaToProtoDescriptorTest.testSimpleTypes:105->isDescriptorEqual:78 test_field_type expected:<STRING> but was:<BYTES>
Error:    BQTableSchemaToProtoDescriptorTest.testStructComplex:225->isDescriptorEqual:78 test_time expected:<INT64> but was:<STRING>
Error:    BQTableSchemaToProtoDescriptorTest.testSimpleTypes:104->isDescriptorEqual:77 test_field_type expected:<STRING> but was:<INT64>

You could run mvn clean install locally in the project root to repro these test failures.

@codecov
Copy link

@codecov codecov bot commented Dec 11, 2020

Codecov Report

Merging #725 (d620bb1) into master (f4de72c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #725   +/-   ##
=========================================
  Coverage     80.40%   80.40%           
  Complexity      957      957           
=========================================
  Files            73       73           
  Lines          5334     5334           
  Branches        405      405           
=========================================
  Hits           4289     4289           
  Misses          877      877           
  Partials        168      168           
Impacted Files Coverage Δ Complexity Δ
...orage/v1alpha2/BQTableSchemaToProtoDescriptor.java 98.48% <100.00%> (ø) 8.00 <0.00> (ø)
...torage/v1beta2/BQTableSchemaToProtoDescriptor.java 98.48% <100.00%> (ø) 8.00 <0.00> (ø)

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 f4de72c...d620bb1. Read the comment docs.

@stephaniewang526 stephaniewang526 merged commit ab6213c into googleapis:master Dec 11, 2020
19 checks passed
gcf-merge-on-green bot pushed a commit that referenced this issue Dec 14, 2020
🤖 I have created a release \*beep\* \*boop\* 
---
### [1.7.1](https://www.github.com/googleapis/java-bigquerystorage/compare/v1.7.0...v1.7.1) (2020-12-14)


### Bug Fixes

* a build break caused by breaking change. ([#729](https://www.github.com/googleapis/java-bigquerystorage/issues/729)) ([a1b1c8e](https://www.github.com/googleapis/java-bigquerystorage/commit/a1b1c8edce87a8d33faf1067f617e3f47c4afc45))
* A test race in JsonStreamWriterTest  ([#722](https://www.github.com/googleapis/java-bigquerystorage/issues/722)) ([35fe606](https://www.github.com/googleapis/java-bigquerystorage/commit/35fe606e43a47dfe844666bf3e385f9c2e582977))
* Add special type tests for Json writer and fix some type mapping issues ([#725](https://www.github.com/googleapis/java-bigquerystorage/issues/725)) ([ab6213c](https://www.github.com/googleapis/java-bigquerystorage/commit/ab6213c244162c74242d3aaf543bfcf9b2eb4405))
* Temporally disable test/code where breaking change is used to help pushing out the breaking change in unreleased Beta ([#727](https://www.github.com/googleapis/java-bigquerystorage/issues/727)) ([38c95c2](https://www.github.com/googleapis/java-bigquerystorage/commit/38c95c23459eb9c4a7215b1a3cb5243165f79815))


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([d70bc3e](https://www.github.com/googleapis/java-bigquerystorage/commit/d70bc3e211ec579129ba53679572b49187f6b6e5))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants