2.25.1.0-b172
tagged this
13 Jan 03:35
Summary: This diff modifies `org.yb.pgsql.TestPgBackendMemoryContext#testLogBackendMemoryTexts` test to successfully run with the connection manager. This test verifies the usage of the `pg_log_backend_memory_contexts(backend_pid)` function, which returns the memory context of the backend process for the PID provided as a parameter. An assert check verifies that the string output of this function contains the correct PID in the test. With connection manager, the `(PgConnection)connection.getBackendPID(conn)` API of JDBC, called from the `getBackendPid()` function in the test, does not return a valid PID because no dedicated backend process is created for each connection made through the connection manager. Therefore, the SQL query `SELECT pg_backend_pid()` is executed in the `getBackendPid()` function to fetch the correct PID when using the connection manager. The test is now configured to run in `ConnectionManagerWarmupMode.NONE` mode, ensuring that the same PID is returned every time `getPgBackendPid()` is called in the test. Jira: DB-10391 Test Plan: Jenkins: enable connection manager, all tests Make sure below test rans successfully with connection manager: ./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgBackendMemoryContext#testLogBackendMemoryTexts Reviewers: jason, skumar, devansh.saxena, telgersma Reviewed By: jason, telgersma Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D41112