palashc commented on code in PR #1859:
URL: https://github.com/apache/phoenix/pull/1859#discussion_r1561756250
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java:
##########
@@ -731,13 +730,14 @@ public void testLastDDLTimestampBootstrap() throws
Exception {
}
private void nullDDLTimestamps(Connection conn) throws SQLException {
+ //ignore system tables since that can interfere with other tests.
String pkCols = TENANT_ID + ", " + TABLE_SCHEM +
", " + TABLE_NAME + ", " + COLUMN_NAME + ", " + COLUMN_FAMILY;
String upsertSql =
"UPSERT INTO " + SYSTEM_CATALOG_NAME + " (" + pkCols + ", " +
LAST_DDL_TIMESTAMP + ")" + " " +
"SELECT " + pkCols + ", NULL FROM " + SYSTEM_CATALOG_NAME + "
" +
- "WHERE " + TABLE_TYPE + " IS NOT NULL";
+ "WHERE " + TABLE_TYPE + " " + " != '" +
PTableType.SYSTEM.getSerializedValue() + "'";
Review Comment:
Tests in this class passed when run individually but fail when the whole
test class is run. One test `testLastDDLTimestampBootstrap()` in the class was
interfering with the other tests. That test nulls out all LAST_DDL_TSs for test
purpose and did not ignore system tables.
The change is in the helper method `nullDDLTimestamps` which nulls out all
tables to ignore SYSTEM tables.
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/UpgradeIT.java:
##########
@@ -731,13 +730,14 @@ public void testLastDDLTimestampBootstrap() throws
Exception {
}
private void nullDDLTimestamps(Connection conn) throws SQLException {
+ //ignore system tables since that can interfere with other tests.
String pkCols = TENANT_ID + ", " + TABLE_SCHEM +
", " + TABLE_NAME + ", " + COLUMN_NAME + ", " + COLUMN_FAMILY;
String upsertSql =
"UPSERT INTO " + SYSTEM_CATALOG_NAME + " (" + pkCols + ", " +
LAST_DDL_TIMESTAMP + ")" + " " +
"SELECT " + pkCols + ", NULL FROM " + SYSTEM_CATALOG_NAME + "
" +
- "WHERE " + TABLE_TYPE + " IS NOT NULL";
+ "WHERE " + TABLE_TYPE + " " + " != '" +
PTableType.SYSTEM.getSerializedValue() + "'";
Review Comment:
Tests in this class passed when run individually but failed when the whole
test class is run. One test `testLastDDLTimestampBootstrap()` in the class was
interfering with the other tests. That test nulls out all LAST_DDL_TSs for test
purpose and did not ignore system tables.
The change is in the helper method `nullDDLTimestamps` which nulls out all
tables to ignore SYSTEM tables.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]