[
https://issues.apache.org/jira/browse/PHOENIX-7029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760527#comment-17760527
]
ASF GitHub Bot commented on PHOENIX-7029:
-----------------------------------------
shahrs87 commented on code in PR #1664:
URL: https://github.com/apache/phoenix/pull/1664#discussion_r1310536818
##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/PhoenixTestDriverIT.java:
##########
@@ -0,0 +1,71 @@
+package org.apache.phoenix.jdbc;
+
+import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
+import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.schema.PMetaData;
+import org.apache.phoenix.schema.PTableKey;
+import org.apache.phoenix.schema.PTableRef;
+import org.apache.phoenix.schema.TableNotFoundException;
+import org.apache.phoenix.thirdparty.com.google.common.collect.Maps;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class PhoenixTestDriverIT extends BaseTest {
+
+ @BeforeClass
+ public static synchronized void doSetup() throws Exception {
+ Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
+ setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+ }
+
Review Comment:
Can you add one more test where you create 2 urls with the same URL, create
2 different connections but test that it returns the same CQSI?
Can you add one more test where you create 2 urls with the different URL
(with different principals), create 2 different connections but test that it
returns different CQSI?
> Add support for multiple query services in PhoenixTestDriver.
> -------------------------------------------------------------
>
> Key: PHOENIX-7029
> URL: https://issues.apache.org/jira/browse/PHOENIX-7029
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Rushabh Shah
> Assignee: Palash Chauhan
> Priority: Major
>
> In PhoenixTestDriver, we cache the connectionQueryServices at class level and
> use it for all the requests.
>
> {code:java}
> @Override // public for testing
> public synchronized ConnectionQueryServices getConnectionQueryServices(String
> url, Properties info) throws SQLException {
> checkClosed();
> if (connectionQueryServices != null) {
> return connectionQueryServices;
> }
> ....
> ....{code}
> In PHOENIX-7025, we want to test different clients using different CQSI. We
> need to add support in PhoenixTestDriver to hold multiple CQSI.
> Even though we are committing the sub tasks to dev branch, this change is
> independent of the feature and can go in master branch directly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)