Skip to content

Commit

Permalink
[2024.2][YSQL][#23837] Disable unit tests which are failing with conn…
Browse files Browse the repository at this point in the history
…ection manager

Summary: Disable the unit tests which are failing with connection manager when connection manager is turned on.

Test Plan: Jenkins: enable connection manager, all tests

Reviewers: skumar, mkumar, rbarigidad, devansh.saxena, stiwary

Reviewed By: rbarigidad

Differential Revision: https://phorge.dev.yugabyte.com/D39369
  • Loading branch information
vpatibandla-yb committed Oct 29, 2024
1 parent 218e23c commit e7e6d65
Show file tree
Hide file tree
Showing 27 changed files with 71 additions and 0 deletions.
3 changes: 3 additions & 0 deletions java/yb-pgsql/src/test/java/org/yb/pgsql/BasePgSQLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ public class BasePgSQLTest extends BaseMiniClusterTest {
protected static final String EXTENSION_NOT_SUPPORTED =
"The extension being used as part of the test is not supported with connection manager.";

protected static final String DISABLING_TEST_WITH_CONN_MGR =
"(DB-13722) Disabling the test with connection manager";

// Warmup modes for Connection Manager during test runs.
protected static enum ConnectionManagerWarmupMode {
NONE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.yb.minicluster.MiniYBCluster;
import org.yb.minicluster.MiniYBClusterBuilder;

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

@RunWith(value = YBTestRunner.class)
Expand Down Expand Up @@ -190,6 +191,7 @@ public void setup() throws Exception {

@Test
public void testAlterTableSetTablespace() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
connections = setupConnections();
List<Thread> threads =
setupConcurrentDdlDmlThreads("ALTER TABLE concurrent_test_tbl SET TABLESPACE %s");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ public void testRoleChanging() throws Exception {

@Test
public void testAttributes() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
// NOTE: The INHERIT attribute is tested separately in testMembershipInheritance.
try (Statement statement = connection.createStatement()) {
statement.execute("CREATE ROLE unprivileged");
Expand Down Expand Up @@ -3225,6 +3226,7 @@ public void testMultiNodeOwnershipChanges() throws Exception {

@Test
public void testLongPasswords() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
try (Statement statement = connection.createStatement()) {
statement.execute("CREATE ROLE unprivileged");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package org.yb.pgsql;

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

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_VALUES_SCAN;
import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_NESTED_LOOP;
import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_MODIFY_TABLE;
import static org.junit.Assume.assumeFalse;
import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_FUNCTION_SCAN;
import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_RESULT;
import static org.yb.pgsql.ExplainAnalyzeUtils.OPERATION_INSERT;
Expand Down Expand Up @@ -349,6 +350,7 @@ public void testEmptyNestedLoop() throws Exception {

@Test
public void testInsertValues() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
// (DB-12699) Catalog read requests decrease in any warmup mode when
// connection manager is enabled, but not to the expected value of 0.
// Allow the test to run without warmed up connections for now.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.sql.Statement;
import java.util.Map;

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

@RunWith(YBTestRunner.class)
Expand All @@ -38,6 +39,7 @@ protected Map<String, String> getTServerFlags() {

@Test
public void testFastpathIntentdbSeeks() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
try (Connection extraConnection = getConnectionBuilder().connect();
Statement stmt = connection.createStatement();
Statement extraStmt = extraConnection.createStatement()) {
Expand Down
2 changes: 2 additions & 0 deletions java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgMisc.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package org.yb.pgsql;

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

import java.util.*;
Expand Down Expand Up @@ -190,6 +191,7 @@ private void executeQueryInTemplate(String query) throws Exception {
*/
@Test
public void testPgHintPlanExtendedQuery() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
try (Statement statement = connection.createStatement()) {
statement.executeUpdate("CREATE TABLE test_table(r1 int, r2 int," +
"PRIMARY KEY(r1 asc, r2 asc))");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
package org.yb.pgsql;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.junit.Assume.assumeFalse;
import static org.yb.AssertionWrappers.*;
import static org.yb.util.BuildTypeUtil.isASAN;
import static org.yb.util.BuildTypeUtil.isTSAN;
Expand Down Expand Up @@ -124,6 +125,7 @@ private void runTestCursor() throws Exception {

@Test
public void testPgRegressCursor() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_cursor_schedule");

// Test CURSOR in JDBC.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.util.YBTestRunnerNonTsanOnly;
Expand All @@ -29,6 +31,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void testPgRegressExtension() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_extensions_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.util.YBTestRunnerNonTsanOnly;
Expand Down Expand Up @@ -43,6 +45,7 @@ public void pruning() throws Exception {

@Test
public void yb_partitions_tests() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_partitions_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.YBTestRunner;
Expand All @@ -28,6 +30,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void testPgRegressPgMisc() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_pg_misc_serial_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.util.Map;

import org.junit.Test;
Expand Down Expand Up @@ -40,6 +42,7 @@ protected Map<String, String> getTServerFlags() {

@Test
public void testPgRegressPgMiscIndependent() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_pg_misc_independent_serial_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.YBTestRunner;
Expand All @@ -29,6 +31,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void testPgStat() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_pg_stat_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.yb.client.TestUtils;
import org.yb.YBTestRunner;

import static org.junit.Assume.assumeFalse;

import java.io.File;
import java.sql.Statement;

Expand All @@ -19,6 +21,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void schedule() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest(new File(TestUtils.getBuildRootDir(),
"postgres_build/contrib/pg_stat_statements"),
"yb_schedule");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.util.Map;

import org.junit.Test;
Expand All @@ -38,6 +40,7 @@ protected void customizeMiniClusterBuilder(MiniYBClusterBuilder builder) {

@Test
public void testPgRegressResetAnalyze() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_reset_analyze_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.YBTestRunner;
Expand All @@ -28,6 +30,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void testPgRegressRules() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_pg_rules_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.io.File;

import org.junit.Test;
Expand All @@ -28,6 +30,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void schedule() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
File regress_schedule = new File(
TestUtils.getBuildRootDir(),
"postgres_build/third-party-extensions/postgresql-hll");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.io.File;
import java.util.Map;
import org.junit.Test;
Expand Down Expand Up @@ -46,6 +48,7 @@ protected Map<String, String> getTServerFlags() {

@Test
public void schedule() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest(
new File(TestUtils.getBuildRootDir(), "postgres_build/third-party-extensions/pg_cron"),
"yb_schedule");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.yb.client.TestUtils;
import org.yb.util.YBTestRunnerNonTsanOnly;

import static org.junit.Assume.assumeFalse;

import java.io.File;
import java.sql.Statement;

Expand All @@ -26,6 +28,7 @@ protected Map<String, String> getTServerFlags() {

@Test
public void schedule() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
setConnMgrWarmupModeAndRestartCluster(ConnectionManagerWarmupMode.NONE);
runPgRegressTest(new File(TestUtils.getBuildRootDir(),
"postgres_build/third-party-extensions/pg_stat_monitor"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.io.File;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import java.util.Map;

import org.junit.Test;
Expand Down Expand Up @@ -42,6 +44,7 @@ protected Map<String, String> getTServerFlags() {

@Test
public void testPgRegressTrigger() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_triggers_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//
package org.yb.pgsql;

import static org.junit.Assume.assumeFalse;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.yb.YBTestRunner;
Expand All @@ -28,6 +30,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void testPgRegressTypes() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest("yb_pg_types_misc_serial_schedule");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.yb.client.TestUtils;
import org.yb.YBTestRunner;

import static org.junit.Assume.assumeFalse;

import java.io.File;

@RunWith(value=YBTestRunner.class)
Expand All @@ -28,6 +30,7 @@ public int getTestMethodTimeoutSec() {

@Test
public void schedule() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
runPgRegressTest(new File(TestUtils.getBuildRootDir(),
"postgres_build/yb-extensions/yb_xcluster_ddl_replication"),
"yb_schedule");
Expand Down
2 changes: 2 additions & 0 deletions java/yb-pgsql/src/test/java/org/yb/pgsql/TestYbAsh.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package org.yb.pgsql;

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

import java.sql.Connection;
Expand Down Expand Up @@ -317,6 +318,7 @@ public void testSampleSize() throws Exception {
*/
@Test
public void testYsqlPids() throws Exception {
assumeFalse(BasePgSQLTest.DISABLING_TEST_WITH_CONN_MGR, isTestRunningWithConnectionManager());
setAshConfigAndRestartCluster(100, ASH_SAMPLE_SIZE);

try (Statement statement = connection.createStatement()) {
Expand Down
Loading

0 comments on commit e7e6d65

Please sign in to comment.