-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
11679 BigQuery-Denormalized Destination: improve code coverage #17827
11679 BigQuery-Denormalized Destination: improve code coverage #17827
Conversation
NOTE
|
/test connector=connectors/destination-bigquery-denormalized
Build PassedTest summary info:
|
is there a recommended reading order for the files in this PR? Also, It looks like some of this is refactoring / moving code around, could you summarize those changes? (would be great to put this info in the PR description) |
NOTE
|
@edgao it's definitely should be explained. I added PR description please have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the description, was super helpful for reading through this!
I added some comments - overall the structure makes a lot of sense, so I just focused on general test implementations. Didn't read through the actual test cases in a lot of depth (LMK if you'd find that valuable); I was more looking for ways to improve readability + future maintainability.
...src/main/java/io/airbyte/integrations/destination/bigquery/formatter/util/FormatterUtil.java
Outdated
Show resolved
Hide resolved
...egrations/destination/bigquery/formatter/DefaultBigQueryDenormalizedRecordFormatterTest.java
Show resolved
Hide resolved
...t/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java
Outdated
Show resolved
Hide resolved
...t/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java
Outdated
Show resolved
Hide resolved
...t/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java
Show resolved
Hide resolved
...egrations/destination/bigquery/formatter/DefaultBigQueryDenormalizedRecordFormatterTest.java
Outdated
Show resolved
Hide resolved
.../integrations/destination/bigquery/formatter/GcsBigQueryDenormalizedRecordFormatterTest.java
Show resolved
Hide resolved
...yte/integrations/destination/bigquery/formatter/arrayformater/DefaultArrayFormatterTest.java
Outdated
Show resolved
Hide resolved
...yte/integrations/destination/bigquery/formatter/arrayformater/DefaultArrayFormatterTest.java
Outdated
Show resolved
Hide resolved
...test/java/io/airbyte/integrations/destination/bigquery/formatter/util/FormatterUtilTest.java
Outdated
Show resolved
Hide resolved
NOTE
|
NOTE
|
...t/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java
Outdated
Show resolved
Hide resolved
...t/java/io/airbyte/integrations/destination/bigquery/BigQueryDenormalizedDestinationTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few inline comments - I think this is really close. Couple final questions and then we should be good to merge 🚛
NOTE
|
NOTE
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for dealing with all the back-and-forth here! LGTM 🎉
* master: (304 commits) Bump helm chart version reference to 0.40.27 (#18152) Bump helm chart version reference to 0.40.26 (#18094) Update deployment.yaml (#18151) Publishes Postgres, MySQL, MSSQL source with changes from #18041 (#18086) Fix minor DBT Cloud Errors. (#18147) Sentry Integration : Stop reporting all non system-error error types. (#18133) Docs: Fix backoff stategy docs (#18143) 🐛 Destination GCS: Fix error logs to log 'Gcs' rather than 'AWS' (#17901) Add openAPI spec for Connector Builder Server (#17535) Alex/mvp UI for dbt cloud integration (#18095) increased timeout for sat tests (#18128) Bmoric/remove dep connector worker (#17977) `recordsRead` should be a long (#18123) doc_update_oath_issue_gsc (#17967) 🎉 Source Zendesk Chat: engagements data fix infinity looping + gradlew format (#18121) 🐛 Source Zendesk Chat: engagements data fix infinity looping (#17745) Custom APM Tracing (#17947) 11679 BigQuery-Denormalized Destination: improve code coverage (#17827) increased timeout for sat tests (#18114) docs: clarify language (#18090) ...
…tehq#17827) * 11679 BigQuery-Denormalized Destination improve code coverage
What
Improve code coverage for BigQuery-Denormalized Destination unit test
Edited
The initial task was to improve the code coverage for unit tests however with existing structure of the unit test for BigQuery-Denormalized Destination it was hard to achieve. In most cases our unit tests for connectors are really similar to integration test.
NOTE:
How
The idea of this refactoring is to have a separate unit test class for each implementation class which needs to be tested. If unit tests duplicates implementation structure we have some benefits like access to protected methods and support, extension and readability of the unit tests.
Change list explanation
protected void addAirbyteColumns(final ObjectNode data, final AirbyteRecordMessage recordMessage)
method aspublic
. After refactoring protected method can be accessed from unit test