Skip to content

E2E test coverage for BQMT#1392

Merged
samdgupi merged 1 commit intodata-integrations:developfrom
cloudsufi:bqmt_e2e-ITN
Apr 12, 2024
Merged

E2E test coverage for BQMT#1392
samdgupi merged 1 commit intodata-integrations:developfrom
cloudsufi:bqmt_e2e-ITN

Conversation

@AnkitCLI
Copy link
Copy Markdown
Contributor

@AnkitCLI AnkitCLI commented Apr 1, 2024

@bharatgulati bharatgulati added the build Trigger unit test build label Apr 1, 2024
@AnkitCLI AnkitCLI force-pushed the bqmt_e2e-ITN branch 2 times, most recently from c677195 to 9966e85 Compare April 1, 2024 09:32
@itsankit-google itsankit-google requested a review from samdgupi April 8, 2024 10:18
@AnkitCLI AnkitCLI force-pushed the bqmt_e2e-ITN branch 2 times, most recently from 4bb2c3b to a9498bb Compare April 10, 2024 07:47
Comment thread src/e2e-test/java/io/cdap/plugin/bigquery/stepsdesign/BigQueryMultiTable.java Outdated
}
// Fetch data from the target BigQuery table
List<Object> bigQueryRows2 = new ArrayList<>();
getBigQueryTableData(targetTable, bigQueryRows2);
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.

nit: Use bigQueryRowsTarget and bigQueryRowsSource

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.

done.

getBigQueryTableData(targetTable, bigQueryRows2);
List<JsonObject> bigQueryResponse2 = new ArrayList<>();
for (Object row : bigQueryRows2) {
JsonObject jsonData = gson.fromJson(String.valueOf(row), JsonObject.class);
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.

nit: You can create a proper class here to deserialize.

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.

we are using these method from common code that we are using for all the plugins to deserialize data from bq.

result.iterateAll().forEach(value -> bigQueryRows.add(value.get(0).getValue()));
}

private static boolean compareBigQueryDataAndBQMT(List<JsonObject> bigQueryResponse, List<JsonObject> bqmtData)
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.

A better way to compare is to write concrete classes and use equals method.

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.

same comment as above.

samdgupi
samdgupi previously approved these changes Apr 10, 2024
@samdgupi samdgupi dismissed their stale review April 10, 2024 13:38

waiting for the build to run

@AnkitCLI AnkitCLI force-pushed the bqmt_e2e-ITN branch 2 times, most recently from 31dc28a to 2216993 Compare April 12, 2024 04:40
@samdgupi samdgupi merged commit e64d5e8 into data-integrations:develop Apr 12, 2024
@psainics psainics deleted the bqmt_e2e-ITN branch February 13, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Trigger unit test build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants