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 4d8fcb7 PHOENIX-6296 Synchronize @Parameters, @BeforeClass and @AfterClass methods take 2 4d8fcb7 is described below commit 4d8fcb71fdfab9bcfcc88622dc2db4d973225f14 Author: Istvan Toth <st...@apache.org> AuthorDate: Mon Jan 4 15:40:24 2021 +0100 PHOENIX-6296 Synchronize @Parameters, @BeforeClass and @AfterClass methods take 2 --- .../src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java | 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 +- .../it/java/org/apache/phoenix/end2end/ParallelStatsEnabledIT.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/end2end/index/ShortViewIndexIdIT.java | 2 +- .../org/apache/phoenix/util/CoprocessorHConnectionTableFactoryIT.java | 2 +- .../src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java | 2 +- .../src/it/java/org/apache/phoenix/schema/SchemaExtractionToolIT.java | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java index 44f383d..2be1551 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BasePermissionsIT.java @@ -155,7 +155,7 @@ public abstract class BasePermissionsIT extends BaseTest { } @BeforeClass - public static void skipHBase21() { + public static synchronized void skipHBase21() { assumeFalse(VersionInfo.getVersion().startsWith("2.1")); } 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 ef33b93..8154ba0 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 57e3c11..9f6db56 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 @@ -226,7 +226,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/ParallelStatsEnabledIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelStatsEnabledIT.java index 4fe0b4b..8628d49 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelStatsEnabledIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelStatsEnabledIT.java @@ -43,7 +43,7 @@ public abstract class ParallelStatsEnabledIT extends BaseTest { protected static RegionCoprocessorEnvironment TaskRegionEnvironment; @BeforeClass - public static final void doSetup() throws Exception { + public static synchronized final void doSetup() throws Exception { Map<String, String> props = Maps.newHashMapWithExpectedSize(1); props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, Long.toString(20)); props.put(QueryServices.STATS_UPDATE_FREQ_MS_ATTRIB, Long.toString(5)); 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 486a535..c08d7d3 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 @@ -62,7 +62,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 = new HashMap<>(); 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 f984036..5c34ff2 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 b76e408..4ba358d 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 @@ -65,7 +65,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 = new HashMap<>(); props.put(QueryServices.TASK_HANDLING_INTERVAL_MS_ATTRIB, "100000000"); 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 e7b2320..b7e260f 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 @@ -38,7 +38,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/end2end/index/ShortViewIndexIdIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ShortViewIndexIdIT.java index feeda4e..a9d516b 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ShortViewIndexIdIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ShortViewIndexIdIT.java @@ -36,7 +36,7 @@ import org.apache.phoenix.thirdparty.com.google.common.collect.Maps; public class ShortViewIndexIdIT extends BaseUniqueNamesOwnClusterIT { @BeforeClass - public static void doSetup() throws Exception { + public static synchronized void doSetup() throws Exception { Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(1); serverProps.put(QueryServices.LONG_VIEW_INDEX_ENABLED_ATTRIB, "false"); Map<String, String> clientProps = Maps.newHashMapWithExpectedSize(1); diff --git a/phoenix-core/src/it/java/org/apache/phoenix/util/CoprocessorHConnectionTableFactoryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/util/CoprocessorHConnectionTableFactoryIT.java index cd8c3d4..dcea9cf 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/util/CoprocessorHConnectionTableFactoryIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/util/CoprocessorHConnectionTableFactoryIT.java @@ -43,7 +43,7 @@ public class CoprocessorHConnectionTableFactoryIT extends BaseUniqueNamesOwnClus LoggerFactory.getLogger(CoprocessorHConnectionTableFactoryIT.class); @BeforeClass - public static final void doSetup() throws Exception { + public static synchronized final void doSetup() throws Exception { setUpTestDriver(ReadOnlyProps.EMPTY_PROPS); 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 1f408b2..6a02cdc 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 @@ -43,7 +43,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())); }