This is an automated email from the ASF dual-hosted git repository.

palashc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new be323a16d3 PHOENIX-7540 : Fix 
PhoenixTestDriverIT#testDifferentCQSForServerConnection test failure (#2087)
be323a16d3 is described below

commit be323a16d37c13125665070e87f7c470ec06f275
Author: Palash Chauhan <palashc...@gmail.com>
AuthorDate: Fri Mar 7 14:26:44 2025 -0800

    PHOENIX-7540 : Fix PhoenixTestDriverIT#testDifferentCQSForServerConnection 
test failure (#2087)
    
    Co-authored-by: Palash Chauhan 
<p.chau...@pchauha-ltm8owy.internal.salesforce.com>
---
 .../src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java
index 18052e3549..aa033dd982 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java
@@ -21,6 +21,7 @@ import 
org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl;
 import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
 import org.apache.phoenix.query.BaseTest;
 import org.apache.phoenix.query.ConnectionQueryServices;
+import org.apache.phoenix.query.DelegateConnectionQueryServices;
 import org.apache.phoenix.schema.PMetaData;
 import org.apache.phoenix.schema.PTableKey;
 import org.apache.phoenix.schema.PTableRef;
@@ -135,6 +136,9 @@ public class PhoenixTestDriverIT extends BaseTest {
              Connection conn2 = QueryUtil.getConnectionOnServer(props, 
config)) {
             ConnectionQueryServices cqs1 = 
conn1.unwrap(PhoenixConnection.class).getQueryServices();
             ConnectionQueryServices cqs2 = 
conn2.unwrap(PhoenixConnection.class).getQueryServices();
+            if (cqs2 instanceof DelegateConnectionQueryServices) {
+                cqs2 = ((DelegateConnectionQueryServices) cqs2).getDelegate();
+            }
             Assert.assertTrue(cqs1 instanceof ConnectionQueryServicesTestImpl);
             Assert.assertTrue(cqs2 instanceof ConnectionQueryServicesTestImpl);
             Assert.assertNotEquals("Server connection should have a different 
CQS.", cqs1, cqs2);

Reply via email to