Summary:
Previously, the test checked for lock release immediately after committing a transaction, which could lead to flakiness if the lock’s internal state had not yet been updated and reflected in pg_locks. This change adds WaitFor to ensure the granted lock is correctly reflected in pg_locks before proceeding.
Jira: DB-17490
Test Plan: ./yb_build.sh tsan --cxx-test pgwrapper_pg_get_lock_status-test --gtest_filter PgGetLockStatusTest.ReceivesWaiterSubtransactionId
Reviewers: bkolagani
Reviewed By: bkolagani
Subscribers: ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D45319