Skip to content

Commit

Permalink
[#23770] YSQL: Stabalize TestPgExplainAnalyze#testExplainAnalyzeOptio…
Browse files Browse the repository at this point in the history
…ns the test with ysql connection manager

Summary:
This diff makes `org.yb.pgsql.TestPgExplainAnalyze#testExplainAnalyzeOptions` test to run in round robin mode when ran with ysql connection manager as the test expects caching of results on the backend on running the query, therefore with round random mode we can deterministically populate the cache on each backend and run the test with ysql conn mgr.
Jira: DB-12674

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

Ensure below test is working:
`./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgExplainAnalyze#testExplainAnalyzeOptions`

Reviewers: skumar, rbarigidad

Reviewed By: rbarigidad

Differential Revision: https://phorge.dev.yugabyte.com/D37891
  • Loading branch information
Manav Kumar committed Sep 17, 2024
1 parent d6bbf59 commit 0b37479
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@ public void testDeleteReturning() throws Exception {

@Test
public void testExplainAnalyzeOptions() throws Exception {
if (isTestRunningWithConnectionManager()) {
// (DB-12674) Allow tests to run in round-robin allocation mode when
// using a pool of warmed up connections to allow for deterministic results.
setConnMgrWarmupModeAndRestartCluster(ConnectionManagerWarmupMode.ROUND_ROBIN);
setUp();
}
String query = String.format("SELECT * FROM %s", TABLE_NAME);
try (Statement stmt = connection.createStatement()) {
setHideNonDeterministicFields(stmt, true);
Expand Down

0 comments on commit 0b37479

Please sign in to comment.