Skip to content

Commit

Permalink
[#20393] YSQL: Stabilize testAlterRoleConfiguration with Connection M…
Browse files Browse the repository at this point in the history
…anager enabled

Summary:
The test `org.yb.pgsql.TestPgAuthorization.testAlterRoleConfiguration` fails with Connection Manager enabled as the test requires unique physical connections in order to view the changes made via the ALTER ROLE SET query being fired in this test. There are other JUnit tests that already make use of this functionality which pass with Connection Manager enabled; this patch skips the test when Connection Manager is enabled.

This situation may be tracked via stickiness of connections later on: DB-11187

Jira: DB-9382

Test Plan:
Jenkins: enable connection manager, test regex: .*TestPgAuthorization.*

./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgAuthorization#testAlterRoleConfiguration

Reviewers: nkumar, mkumar

Reviewed By: nkumar

Differential Revision: https://phorge.dev.yugabyte.com/D34617
  • Loading branch information
rahulb-yb committed May 7, 2024
1 parent d5abd5e commit 51063a4
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package org.yb.pgsql;

import static org.yb.AssertionWrappers.*;
import static org.junit.Assume.*;

import org.hamcrest.CoreMatchers;
import org.junit.Test;
Expand Down Expand Up @@ -1078,6 +1079,13 @@ public void testDefaultRoles() throws Exception {

@Test
public void testAlterRoleConfiguration() throws Exception {

// The test fails with Connection Manager as it is expected that a new
// session would latch onto a new physical connection. Instead, two logical
// connections use the same physical connection, leading to unexpected
// results as per the expectations of the test.
assumeFalse(BasePgSQLTest.UNIQUE_PHYSICAL_CONNS_NEEDED, isTestRunningWithConnectionManager());

try (Statement statement = connection.createStatement()) {
statement.execute("CREATE ROLE test_role LOGIN");

Expand Down

0 comments on commit 51063a4

Please sign in to comment.