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

stoty 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 7dd33bdb5a PHOENIX-6840 Very flakey 
ParallelPhoenixConnectionFailureTest
7dd33bdb5a is described below

commit 7dd33bdb5a7b800d4385bb10784191caf0f908fa
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Nov 28 14:49:28 2022 +0100

    PHOENIX-6840 Very flakey ParallelPhoenixConnectionFailureTest
---
 .../jdbc/ParallelPhoenixConnectionFailureTest.java | 34 ++--------------------
 1 file changed, 3 insertions(+), 31 deletions(-)

diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionFailureTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionFailureTest.java
index eaa78bbf54..ed74645d70 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionFailureTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/ParallelPhoenixConnectionFailureTest.java
@@ -19,65 +19,37 @@ package org.apache.phoenix.jdbc;
 
 import static org.apache.phoenix.util.PhoenixRuntime.JDBC_PROTOCOL;
 import static org.apache.phoenix.util.PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR;
-import static org.apache.phoenix.util.PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR;
-import static 
org.apache.phoenix.util.PhoenixRuntime.PHOENIX_TEST_DRIVER_URL_PARAM;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doThrow;
 
-import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
 import java.sql.Statement;
-import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
 import org.apache.phoenix.query.BaseTest;
 import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.util.ReadOnlyProps;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
 import org.mockito.stubbing.Answer;
 
-import org.apache.phoenix.thirdparty.com.google.common.collect.Maps;
-
 /**
  * Test to make sure once an error is encountered on an underlying phoenix 
connection
  * we don't use that connection during the entire lifecycle of client 
conenction
  */
-@Category(NeedsOwnMiniClusterTest.class)
 public class ParallelPhoenixConnectionFailureTest extends BaseTest {
 
     private static String url =
-            JDBC_PROTOCOL + JDBC_PROTOCOL_SEPARATOR + 
PhoenixRuntime.CONNECTIONLESS
-                    + JDBC_PROTOCOL_SEPARATOR + 
HConstants.DEFAULT_ZOOKEPER_CLIENT_PORT
-                    + JDBC_PROTOCOL_TERMINATOR + 
PHOENIX_TEST_DRIVER_URL_PARAM;;
-    private static PhoenixTestDriver driver;
-    private static HBaseTestingUtility hbaseTestingUtility;
-
-    @BeforeClass
-    public static void setupBeforeClass() throws Exception {
-        Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
-        driver = initAndRegisterTestDriver(url, new ReadOnlyProps(props));
-        hbaseTestingUtility = new HBaseTestingUtility();
-    }
-
-    @AfterClass
-    public static void tearDownAfterClass() {
-        destroyDriver(driver);
-    }
+            JDBC_PROTOCOL + JDBC_PROTOCOL_SEPARATOR + 
PhoenixRuntime.CONNECTIONLESS;
 
     @Test
     public void testExecuteQueryChainFailure() throws SQLException {
+        HBaseTestingUtility hbaseTestingUtility = new HBaseTestingUtility();
+
         PhoenixConnection conn1 = (PhoenixConnection) 
DriverManager.getConnection(url);
         PhoenixConnection conn2 = (PhoenixConnection) 
DriverManager.getConnection(url);
         PhoenixConnection connSpy1 = Mockito.spy(conn1);

Reply via email to