Skip to content

Commit 2a42c65

Browse files
nmemondtimatkinson-yw
authored andcommitted
Add integration tests to live spanner migration for checking PostgreSQL data type support (GoogleCloudPlatform#3152)
* Add data types test for live migration from PostgreSQL to Spanner (both dialects) * Use static resource manager instead to allow access to CDC log * Fix expected value in test * Fix spotless * Ignore columns which don't seem to migrate consistently (to avoid flaky test) * Properly ignore the columns... * Ignore columns which don't seem to migrate consistently (to avoid flaky tests) * Ignore columns which don't seem to migrate consistently (to avoid flaky tests) --------- Co-authored-by: Atkinson <tim.atkinson@improving.com>
1 parent 583ecb0 commit 2a42c65

File tree

5 files changed

+1244
-1
lines changed

5 files changed

+1244
-1
lines changed

v2/datastream-to-spanner/src/test/java/com/google/cloud/teleport/v2/templates/DataStreamToSpannerITBase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,11 @@ protected void executeSqlScript(JDBCResourceManager resourceManager, String reso
572572
for (String d : ddls) {
573573
if (!d.isBlank()) {
574574
try {
575-
resourceManager.runSQLUpdate(d);
575+
if (d.toLowerCase().trim().startsWith("select")) {
576+
resourceManager.runSQLQuery(d);
577+
} else {
578+
resourceManager.runSQLUpdate(d);
579+
}
576580
} catch (Exception e) {
577581
LOG.error("Exception while executing DDL {}", d, e);
578582
throw e;

0 commit comments

Comments
 (0)