From 3615db5183c2ce2246c5892b4f8f8455ce917f79 Mon Sep 17 00:00:00 2001 From: Heesung Sohn Date: Fri, 1 Nov 2024 16:03:28 -0700 Subject: [PATCH] check style --- .../tests/integration/suites/PulsarTestSuite.java | 8 +++++--- .../tests/integration/topologies/PulsarCluster.java | 4 ++-- .../integration/topologies/PulsarClusterSpec.java | 9 ++++----- .../integration/topologies/PulsarClusterTestBase.java | 11 +++++------ .../integration/topologies/PulsarGeoCluster.java | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/suites/PulsarTestSuite.java b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/suites/PulsarTestSuite.java index 02c4e3c7ec60d..3b88d394bc9d8 100644 --- a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/suites/PulsarTestSuite.java +++ b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/suites/PulsarTestSuite.java @@ -35,11 +35,13 @@ public final void tearDownAfterClass() throws Exception { cleanup(); } - public static void retryStrategically(Predicate predicate, int retryCount, long intSleepTimeInMillis) throws Exception { + public static void retryStrategically(Predicate predicate, int retryCount, long intSleepTimeInMillis) + throws Exception { retryStrategically(predicate, retryCount, intSleepTimeInMillis, false); } - public static void retryStrategically(Predicate predicate, int retryCount, long intSleepTimeInMillis, boolean throwException) + public static void retryStrategically(Predicate predicate, int retryCount, long intSleepTimeInMillis, + boolean throwException) throws Exception { for (int i = 0; i < retryCount; i++) { @@ -56,7 +58,7 @@ public static void retryStrategically(Predicate predicate, int retryCount, } } - Thread.sleep(intSleepTimeInMillis + (intSleepTimeInMillis * i)); + Thread.sleep(intSleepTimeInMillis + (intSleepTimeInMillis * i)); } } } diff --git a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java index 3506612658ea6..58981f065bd8b 100644 --- a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java +++ b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java @@ -43,13 +43,13 @@ import org.apache.pulsar.tests.integration.containers.BKContainer; import org.apache.pulsar.tests.integration.containers.BrokerContainer; import org.apache.pulsar.tests.integration.containers.CSContainer; +import org.apache.pulsar.tests.integration.containers.OxiaContainer; import org.apache.pulsar.tests.integration.containers.ProxyContainer; import org.apache.pulsar.tests.integration.containers.PulsarContainer; import org.apache.pulsar.tests.integration.containers.PulsarInitMetadataContainer; import org.apache.pulsar.tests.integration.containers.WorkerContainer; import org.apache.pulsar.tests.integration.containers.ZKContainer; import org.apache.pulsar.tests.integration.docker.ContainerExecResult; -import org.apache.pulsar.tests.integration.containers.OxiaContainer; import org.testcontainers.containers.BindMode; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.Network; @@ -66,7 +66,7 @@ public class PulsarCluster { public static final String CURL = "/usr/bin/curl"; /** - * Pulsar Cluster Spec + * Pulsar Cluster Spec. * * @param spec pulsar cluster spec. * @return the built pulsar cluster diff --git a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterSpec.java b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterSpec.java index 9f7e018d369a5..d8417b907646e 100644 --- a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterSpec.java +++ b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterSpec.java @@ -80,7 +80,7 @@ public class PulsarClusterSpec { int numFunctionWorkers = 0; /** - * Allow to query the last message + * Allow to query the last message. */ @Default boolean queryLastMessage = false; @@ -94,8 +94,7 @@ public class PulsarClusterSpec { FunctionRuntimeType functionRuntimeType = FunctionRuntimeType.PROCESS; /** - * Returns the list of external services to start with - * this cluster. + * Returns the list of external services to start with this cluster. * * @return the list of external services to start with the cluster. */ @@ -117,7 +116,7 @@ public class PulsarClusterSpec { boolean enableContainerLog = false; /** - * Provide a map of paths (in the classpath) to mount as volumes inside the containers + * Provide a map of paths (in the classpath) to mount as volumes inside the containers. */ @Default Map classPathVolumeMounts = new TreeMap<>(); @@ -129,7 +128,7 @@ public class PulsarClusterSpec { GenericContainer dataContainer = null; /** - * Pulsar Test Image Name + * Pulsar Test Image Name. * * @return the version of the pulsar test image to use */ diff --git a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterTestBase.java b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterTestBase.java index 0879c737fb58f..5d5a5ac4beda0 100644 --- a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterTestBase.java +++ b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarClusterTestBase.java @@ -46,7 +46,6 @@ public abstract class PulsarClusterTestBase extends PulsarTestBase { protected final List bookieAdditionalPorts = new LinkedList<>(); - private Map readClientConfigs(String clientConfFilePath) throws IOException { Properties prop = new Properties(System.getProperties()); try (FileInputStream input = new FileInputStream(clientConfFilePath)) { @@ -91,7 +90,7 @@ protected final void cleanup() throws Exception { @DataProvider(name = "ServiceUrlAndTopics") public Object[][] serviceUrlAndTopics() { - return new Object[][] { + return new Object[][]{ // plain text, persistent topic { stringSupplier(() -> getPulsarCluster().getPlainTextServiceUrl()), @@ -107,7 +106,7 @@ public Object[][] serviceUrlAndTopics() { @DataProvider(name = "ServiceUrls") public Object[][] serviceUrls() { - return new Object[][] { + return new Object[][]{ // plain text { stringSupplier(() -> getPulsarCluster().getPlainTextServiceUrl()) @@ -117,7 +116,7 @@ public Object[][] serviceUrls() { @DataProvider(name = "ServiceAndAdminUrls") public Object[][] serviceAndAdminUrls() { - return new Object[][] { + return new Object[][]{ // plain text { stringSupplier(() -> getPulsarCluster().getPlainTextServiceUrl()), @@ -128,7 +127,7 @@ public Object[][] serviceAndAdminUrls() { @DataProvider public Object[][] serviceUrlAndTopicDomain() { - return new Object[][] { + return new Object[][]{ { stringSupplier(() -> getPulsarCluster().getPlainTextServiceUrl()), TopicDomain.persistent @@ -142,7 +141,7 @@ public Object[][] serviceUrlAndTopicDomain() { @DataProvider(name = "topicDomain") public Object[][] topicDomain() { - return new Object[][] { + return new Object[][]{ { TopicDomain.persistent }, diff --git a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarGeoCluster.java b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarGeoCluster.java index 4099aa06e5ece..fa0b74c7fa516 100644 --- a/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarGeoCluster.java +++ b/pulsar-inttest-lib/src/main/java/org/apache/pulsar/tests/integration/topologies/PulsarGeoCluster.java @@ -36,7 +36,7 @@ public class PulsarGeoCluster { private final PulsarCluster[] clusters; /** - * Pulsar Cluster Spec + * Pulsar Cluster Spec. * * @param specs each pulsar cluster spec. * @return the built a pulsar cluster with geo replication