You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2021/01/04 18:38:32 UTC

[phoenix] branch 4.x updated: PHOENIX-6296 Synchronize @Parameters, @BeforeClass and @AfterClass methods take 2

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

stoty pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new 3116705  PHOENIX-6296 Synchronize @Parameters, @BeforeClass and @AfterClass methods take 2
3116705 is described below

commit 3116705dff0c71d4230ace81aee8a9e89d36b697
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Jan 4 15:54:21 2021 +0100

    PHOENIX-6296 Synchronize @Parameters, @BeforeClass and @AfterClass methods take 2
---
 phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java  | 2 +-
 .../src/it/java/org/apache/phoenix/end2end/IndexToolTimeRangeIT.java  | 2 +-
 .../src/it/java/org/apache/phoenix/end2end/IndexUpgradeToolIT.java    | 2 +-
 .../java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java  | 4 ++--
 .../apache/phoenix/end2end/RowValueConstructorOffsetOptionalIT.java   | 4 ++--
 .../src/it/java/org/apache/phoenix/end2end/ViewIndexIdRetrieveIT.java | 2 +-
 .../org/apache/phoenix/end2end/index/ImmutableIndexExtendedIT.java    | 2 +-
 .../phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java    | 2 +-
 .../phoenix/end2end/index/IndexVerificationResultRepositoryIT.java    | 2 +-
 .../it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java  | 4 ++--
 .../src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java   | 2 +-
 .../src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java | 2 +-
 12 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
index daf2454..5ac07a1 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
@@ -82,7 +82,7 @@ public abstract class BaseQueryIT extends ParallelStatsDisabledIT {
     private static final Logger LOGGER = LoggerFactory.getLogger(BaseQueryIT.class);
 
     @BeforeParam
-    public static void initTables(String idxDdl, boolean columnEncoded,
+    public static synchronized void initTables(String idxDdl, boolean columnEncoded,
             boolean keepDeletedCells) throws Exception {
         StringBuilder optionBuilder = new StringBuilder();
         if (!columnEncoded) {
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolTimeRangeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolTimeRangeIT.java
index 993a2a4..15d0e49 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolTimeRangeIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolTimeRangeIT.java
@@ -218,7 +218,7 @@ public class IndexToolTimeRangeIT extends BaseUniqueNamesOwnClusterIT {
     }
 
     @AfterClass
-    public static void teardown() {
+    public static synchronized void teardown() {
         tearDownMiniClusterAsync(2);
     }
 }
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexUpgradeToolIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexUpgradeToolIT.java
index 586147f..66f87fd 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexUpgradeToolIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexUpgradeToolIT.java
@@ -66,7 +66,7 @@ public class IndexUpgradeToolIT extends BaseTest {
     }
 
     @BeforeClass
-    public static void setup() throws Exception {
+    public static synchronized void setup() throws Exception {
         Map<String, String> props = Collections.emptyMap();
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
     }
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
index 0981757..debf1ec 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetIT.java
@@ -76,7 +76,7 @@ public class RowValueConstructorOffsetIT extends ParallelStatsDisabledIT {
     private static Connection conn = null;
 
     @BeforeClass
-    public static void init() throws SQLException {
+    public static synchronized void init() throws SQLException {
         conn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES));
 
         String dataTableDDL = String.format(DATA_DDL, DATA_TABLE_NAME);
@@ -125,7 +125,7 @@ public class RowValueConstructorOffsetIT extends ParallelStatsDisabledIT {
     }
 
     @AfterClass
-    public static void cleanup() {
+    public static synchronized void cleanup() {
         try {
             if (conn != null) {
                 conn.close();
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetOptionalIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetOptionalIT.java
index f0d6484..5fce94e 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetOptionalIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorOffsetOptionalIT.java
@@ -79,12 +79,12 @@ public class RowValueConstructorOffsetOptionalIT extends ParallelStatsDisabledIT
     private int NUMBER_OF_TENANT_VIEWS = 5;
 
     @BeforeClass
-    public static void init() throws SQLException {
+    public static synchronized void init() throws SQLException {
         conn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES));
     }
 
     @AfterClass
-    public static void cleanup() {
+    public static synchronized void cleanup() {
         try {
             if (conn != null) {
                 conn.close();
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIndexIdRetrieveIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIndexIdRetrieveIT.java
index 698a574..dd0b0ca 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIndexIdRetrieveIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIndexIdRetrieveIT.java
@@ -63,7 +63,7 @@ public class ViewIndexIdRetrieveIT extends BaseUniqueNamesOwnClusterIT {
             " FROM SYSTEM.CATALOG WHERE TABLE_NAME='%s' AND COLUMN_COUNT IS NOT NULL";
 
     @BeforeClass
-    public static void setUp() throws Exception {
+    public static synchronized void setUp() throws Exception {
         Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
         props.put(ScanInfoUtil.PHOENIX_MAX_LOOKBACK_AGE_CONF_KEY, Integer.toString(60*60));
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexExtendedIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexExtendedIT.java
index 49219bf..518f1be 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexExtendedIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexExtendedIT.java
@@ -75,7 +75,7 @@ public class ImmutableIndexExtendedIT extends ParallelStatsDisabledIT {
     }
 
     @BeforeClass
-    public static void doSetup() throws Exception {
+    public static synchronized void doSetup() throws Exception {
         Map<String, String> props = Maps.newHashMapWithExpectedSize(1);
         props.put(HConstants.HBASE_CLIENT_RETRIES_NUMBER, "5");
         setUpTestDriver(new ReadOnlyProps(props));
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
index 5731c6a..e6a7da5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
@@ -67,7 +67,7 @@ import static org.mockito.Mockito.when;
 public class IndexVerificationOutputRepositoryIT extends ParallelStatsDisabledIT {
 
     @BeforeClass
-    public static void setupClass() throws Exception {
+    public static synchronized void setupClass() throws Exception {
         Map<String, String> props = Collections.emptyMap();
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
     }
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
index 2c9380b..e90efbf 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
@@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
 public class IndexVerificationResultRepositoryIT extends ParallelStatsDisabledIT {
 
     @BeforeClass
-    public static void setupClass() throws Exception {
+    public static synchronized void setupClass() throws Exception {
         Map<String, String> props = Collections.emptyMap();
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
     }
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
index 003dde7..c43a064 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/query/MaxConcurrentConnectionsIT.java
@@ -52,7 +52,7 @@ public class MaxConcurrentConnectionsIT extends BaseUniqueNamesOwnClusterIT {
     private static HBaseTestingUtility hbaseTestUtil;
 
     @BeforeClass
-    public static void setUp() throws Exception {
+    public static synchronized void setUp() throws Exception {
         hbaseTestUtil = new HBaseTestingUtility();
         Configuration serverConf = hbaseTestUtil.getConfiguration();
         // Disable any task handling as that creates additional connections
@@ -76,7 +76,7 @@ public class MaxConcurrentConnectionsIT extends BaseUniqueNamesOwnClusterIT {
 
     //Have to shutdown our special delayed region server
     @AfterClass
-    public static void tearDown() throws Exception {
+    public static synchronized void tearDown() throws Exception {
         hbaseTestUtil.shutdownMiniCluster();
     }
 
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java b/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
index 21c7514..d947aa8 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
@@ -45,7 +45,7 @@ public class MetaDataClientTest extends BaseConnectionlessQueryTest {
     private static CreateTableStatement stmt;
 
     @BeforeClass
-    public static void setupTest() throws SQLException {
+    public static synchronized void setupTest() throws SQLException {
         schema = generateUniqueName();
         baseTable = generateUniqueName();
         phxConn = (PhoenixConnection) DriverManager.getConnection(getUrl());
diff --git a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java b/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java
index 65a0e99..8d0704b 100644
--- a/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java
+++ b/phoenix-tools/src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java
@@ -47,7 +47,7 @@ import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 public class SchemaExtractionToolIT extends ParallelStatsEnabledIT {
 
     @BeforeClass
-    public static void setup() throws Exception {
+    public static synchronized void setup() throws Exception {
         Map<String, String> props = Collections.emptyMap();
         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
     }