Skip to content

Commit 07fdad6

Browse files
committed
[#21772] YSQL: Stabilize createIndexViolatingUniqueness with Connection Manager enabled
Summary: When connection manager is enabled, the test org.yb.pgsql.TestPgUniqueConstraint.createIndexViolatingUniqueness fails. During the runtime of the test, the allowed preview flags are modified to a certain value. This disables the required preview flag to enable connection manager, hence causing the test to fail. The corresponding flag (enable_ysql_conn_mgr) can be added to the preview flag list when the connection endpoint is the connection manager layer. Jira: DB-10648 Test Plan: Jenkins: enable connection manager, test regex: .*TestPgUniqueConstraint.* ./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgUniqueConstraint#createIndexViolatingUniqueness Reviewers: janand, myang Reviewed By: janand, myang Differential Revision: https://phorge.dev.yugabyte.com/D33467
1 parent c9a9c34 commit 07fdad6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgUniqueConstraint.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,12 @@ public void createIndexViolatingUniqueness() throws Exception {
402402
"enable_transactional_ddl_gc", "false"));
403403
}
404404
for (HostAndPort hp : miniCluster.getTabletServers().keySet()) {
405-
assertTrue(miniCluster.getClient().setFlag(hp,
406-
"allowed_preview_flags_csv", "ysql_yb_ddl_rollback_enabled=true"));
405+
if (isTestRunningWithConnectionManager())
406+
assertTrue(miniCluster.getClient().setFlag(hp,
407+
"allowed_preview_flags_csv", "ysql_yb_ddl_rollback_enabled,enable_ysql_conn_mgr"));
408+
else
409+
assertTrue(miniCluster.getClient().setFlag(hp,
410+
"allowed_preview_flags_csv", "ysql_yb_ddl_rollback_enabled=true"));
407411
assertTrue(miniCluster.getClient().setFlag(hp,
408412
"ysql_yb_ddl_rollback_enabled", "false"));
409413
}

0 commit comments

Comments
 (0)