Skip to content

Commit 63be03a

Browse files
committed
[#21756] YSQL: Stabilize testYbTerminatedQueriesMultipleCauses with Connection Manager enabled
Summary: When connection manager is enabled, the test org.yb.pgsql.TestPgYbStat.testYbTerminatedQueriesMultipleCauses fails. During the runtime of the test, the backend process is explicitly killed, and the test expects a corresponding error message. With the introduction of the connection manager layer, the error message is instead sent by odyssey, which causes the assertion to fail. By expecting a different error message when connection manager is used as an endpoint, this test passes. Jira: DB-10630 Test Plan: Jenkins: enable connection manager, test regex: .*TestPgYbStat.* ./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgYbStat#testYbTerminatedQueriesMultipleCauses Reviewers: janand, telgersma Reviewed By: janand, telgersma Differential Revision: https://phorge.dev.yugabyte.com/D33464
1 parent 7dab6ae commit 63be03a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ private void executeQueryAndSendSignal(final String query,
7272
try {
7373
statement.execute(query);
7474
} catch (Throwable throwable) {
75-
assertEquals("An I/O error occurred while sending to the backend.",
75+
if(isTestRunningWithConnectionManager())
76+
assertTrue(throwable.getMessage().contains("remote server read/write error"));
77+
else
78+
assertEquals("An I/O error occurred while sending to the backend.",
7679
throwable.getMessage());
7780
}
7881
});

0 commit comments

Comments
 (0)