diff --git a/core/src/main/java/cz/xtf/core/config/OpenShiftConfig.java b/core/src/main/java/cz/xtf/core/config/OpenShiftConfig.java index fb70ca53..c33dc391 100644 --- a/core/src/main/java/cz/xtf/core/config/OpenShiftConfig.java +++ b/core/src/main/java/cz/xtf/core/config/OpenShiftConfig.java @@ -87,7 +87,7 @@ public static boolean useNamespacePerTestCase() { /** * Used only if xtf.openshift.namespace.per.testcase=true - * + * * @return limit on namespace if it's set by -Dxtf.openshift.namespace.per.testcase.length.limit property */ public static int getNamespaceLengthLimitForUniqueNamespacePerTest() { diff --git a/core/src/main/java/cz/xtf/core/helm/HelmBinaryPathResolver.java b/core/src/main/java/cz/xtf/core/helm/HelmBinaryPathResolver.java index 9a225521..8b35cc88 100644 --- a/core/src/main/java/cz/xtf/core/helm/HelmBinaryPathResolver.java +++ b/core/src/main/java/cz/xtf/core/helm/HelmBinaryPathResolver.java @@ -6,7 +6,7 @@ interface HelmBinaryPathResolver { /** * Resolves Helm client binary path - * + * * @return Helm client binary path */ String resolve(); diff --git a/core/src/main/java/cz/xtf/core/namespace/NamespaceManager.java b/core/src/main/java/cz/xtf/core/namespace/NamespaceManager.java index a99bcee8..9e2b3f0d 100644 --- a/core/src/main/java/cz/xtf/core/namespace/NamespaceManager.java +++ b/core/src/main/java/cz/xtf/core/namespace/NamespaceManager.java @@ -25,7 +25,7 @@ public class NamespaceManager { /** * By default (xtf.openshift.namespace.per.testcase=false) all entries in map point to value returned by - * + * * @see OpenShiftConfig#namespace(). If xtf.openshift.namespace.per.testcase=true then each entry points to namespace * assigned to each test case by {@see NamespaceManager#getNamespaceForTestClass} * @@ -116,7 +116,7 @@ private static void checkAndWaitIfNamespaceIsTerminating(String namespace) { * Deletes namespace as returned by @see #getNamespace * * @param waitForDeletion whether to wait for deletion (timeout 2 min) - * + * * @return true if successful, false otherwise */ public static boolean deleteProject(boolean waitForDeletion) { @@ -178,7 +178,7 @@ private static String getNamespaceForTestClass(TestDescriptor testDescriptor) { // route suffix is: .apps.eapqe-024-dryf.eapqe.psi.redhat.com if ((OpenShiftConfig.namespace() + "-" + testDescriptor.getParent().get().getDisplayName().toLowerCase()) - .length() > OpenShiftConfig.getNamespaceLengthLimitForUniqueNamespacePerTest()) { + .length() > OpenShiftConfig.getNamespaceLengthLimitForUniqueNamespacePerTest()) { return OpenShiftConfig.namespace() + "-" + StringUtils.truncate(DigestUtils.sha256Hex(testDescriptor.getParent().get().getDisplayName() diff --git a/core/src/main/java/cz/xtf/core/openshift/ClusterVersionInfo.java b/core/src/main/java/cz/xtf/core/openshift/ClusterVersionInfo.java index 1704fa0f..051b8438 100644 --- a/core/src/main/java/cz/xtf/core/openshift/ClusterVersionInfo.java +++ b/core/src/main/java/cz/xtf/core/openshift/ClusterVersionInfo.java @@ -84,7 +84,7 @@ boolean isNightly() { /** * Detects cluster version from cluster - * + * * @return version of OpenShift cluster or null */ private String detectClusterVersionFromCluster() { diff --git a/core/src/main/java/cz/xtf/core/openshift/OpenShift.java b/core/src/main/java/cz/xtf/core/openshift/OpenShift.java index 5da959f3..77f34efa 100644 --- a/core/src/main/java/cz/xtf/core/openshift/OpenShift.java +++ b/core/src/main/java/cz/xtf/core/openshift/OpenShift.java @@ -324,7 +324,7 @@ public ProjectRequest recreateProject(String name) { /** * Creates or recreates project specified by projectRequest instance. - * + * * @param projectRequest project request instance * @return ProjectRequest instance */ @@ -1278,7 +1278,7 @@ public Waiter clean() { try { customResources(crdContextProvider.getContext(), GenericKubernetesResource.class, GenericKubernetesResourceList.class) - .inNamespace(getNamespace()).delete(); + .inNamespace(getNamespace()).delete(); log.debug("DELETE :: " + crdContextProvider.getContext().getName() + " instances"); } catch (KubernetesClientException kce) { log.debug(crdContextProvider.getContext().getName() + " might not be installed on the cluster.", kce); diff --git a/core/src/main/java/cz/xtf/core/openshift/OpenShiftBinary.java b/core/src/main/java/cz/xtf/core/openshift/OpenShiftBinary.java index 6d4e48c4..7a730985 100644 --- a/core/src/main/java/cz/xtf/core/openshift/OpenShiftBinary.java +++ b/core/src/main/java/cz/xtf/core/openshift/OpenShiftBinary.java @@ -34,7 +34,7 @@ public void login(String url, String username, String password) { /** * Apply configuration file in the specified namespace. * Delegates to `oc apply --filename='sourcepath' --namespace='namespace'` - * + * * @param sourcePath path to configration file * @param namespace namespace */ @@ -44,7 +44,7 @@ public void apply(String namespace, String sourcePath) { /** * Apply configuration file. Delegates to `oc apply --filename='sourcepath` - * + * * @param sourcePath path to configration file */ public void apply(String sourcePath) { @@ -53,7 +53,7 @@ public void apply(String sourcePath) { /** * Apply configuration files in the order they appear in the list - * + * * @param sourcePaths list of paths to configuration files */ public void apply(List sourcePaths) { @@ -64,7 +64,7 @@ public void apply(List sourcePaths) { /** * Apply configuration files in the order they appear in the list, using supplied namespace. - * + * * @param namespace namespace in which the configuration files should be applied * @param sourcePaths list of paths to configuration files */ diff --git a/core/src/main/java/cz/xtf/core/openshift/OpenShiftWaiters.java b/core/src/main/java/cz/xtf/core/openshift/OpenShiftWaiters.java index 4722bcde..765b0cdc 100644 --- a/core/src/main/java/cz/xtf/core/openshift/OpenShiftWaiters.java +++ b/core/src/main/java/cz/xtf/core/openshift/OpenShiftWaiters.java @@ -66,9 +66,9 @@ public Waiter hasBuildCompleted(String buildConfigName) { return new SupplierWaiter<>(supplier, "Complete"::equals, "Failed"::equals, TimeUnit.MILLISECONDS, WaitingConfig.buildTimeout(), reason) - .logPoint(Waiter.LogPoint.BOTH) - .failFast(failFast) - .interval(5_000); + .logPoint(Waiter.LogPoint.BOTH) + .failFast(failFast) + .interval(5_000); } /** @@ -85,9 +85,9 @@ public Waiter hasBuildCompleted(Build build) { return new SupplierWaiter<>(supplier, "Complete"::equals, "Failed"::equals, TimeUnit.MILLISECONDS, WaitingConfig.buildTimeout(), reason) - .logPoint(Waiter.LogPoint.BOTH) - .failFast(failFast) - .interval(5_000); + .logPoint(Waiter.LogPoint.BOTH) + .failFast(failFast) + .interval(5_000); } /** @@ -114,7 +114,7 @@ public Waiter isLatestBuildPresent(String buildConfigName) { public Waiter isProjectReady() { return new SimpleWaiter(() -> openShift.getProject() != null, TimeUnit.SECONDS, 20, "Waiting for the project to be created.") - .failFast(failFast); + .failFast(failFast); } /** diff --git a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogColoredPrintStream.java b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogColoredPrintStream.java index 0983f60f..1d4f2199 100644 --- a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogColoredPrintStream.java +++ b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogColoredPrintStream.java @@ -38,7 +38,7 @@ private ServiceLogColoredPrintStream(OutputStream out, ServiceLogColor color, St * If we have e.g.: "AAAA\nBBBB", we would have 3 tokens: "AAAA","\n","BBBB"; * Note that a buffer not containing any new line is considered a single token e.g. buffer "AAAA" is considered as * the single token "AAAA" - * + * * @param buf the data. * @param off the start offset in the data. * @param len the number of bytes to write. @@ -75,7 +75,7 @@ private boolean isNewLine(byte[] token) { * Prints the line header which usually consists of the name of the container the log comes from, preceded by the * name of the pod and the name of the namespace where the container is running, with properly colored background * and foreground - * + * * @throws IOException in case something goes wrong while writing to the underlying stream */ private void printLineHeader() throws IOException { @@ -92,7 +92,7 @@ private void printLineHeader() throws IOException { /** * Prints a token of the log line with properly colored background and foreground - * + * * @param buf the data. * @param off the start offset in the data. * @param len the number of bytes to write. @@ -117,7 +117,7 @@ public void write(int b) { /** * Prints the data with properly colored background and foreground; takes care of adding a line header to each line - * + * * @param buf the data. * @param off the start offset in the data. * @param len the number of bytes to write. diff --git a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogUtils.java b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogUtils.java index 844c2f38..69a91d89 100644 --- a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogUtils.java +++ b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogUtils.java @@ -10,7 +10,7 @@ public class ServiceLogUtils { /** * Adds a prefix to the message which is passed in, in order to display that it is part of the logs streaming * process, i.e. by adding a conventional part to the beginning of the message. - * + * * @param originalMessage the original message * @return A string made up by the conventional prefix, followed by the original message */ @@ -21,7 +21,7 @@ public static String getConventionallyPrefixedLogMessage(final String originalMe /** * Formats the given prefix into a conventional header for a any streamed log line so that it is clear to the end * user that it is coming from a service log rather than from the current process one - * + * * @param prefix The prefix that will be part of the header * @return A string representing the header for a streamed log line which will be written to the output stream */ diff --git a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogsStreaming.java b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogsStreaming.java index 1fc327ed..34162dcd 100644 --- a/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogsStreaming.java +++ b/core/src/main/java/cz/xtf/core/service/logs/streaming/ServiceLogsStreaming.java @@ -15,7 +15,7 @@ public @interface ServiceLogsStreaming { /** * Returns the log level filter which is set for services annotated with {@link ServiceLogsStreaming} - * + * * @return A String identifying the log level filter which is set for services annotated with * {@link ServiceLogsStreaming} */ @@ -24,7 +24,7 @@ /** * Defines the base path where log files produced by services annotated with {@link ServiceLogsStreaming} should be * streamed - * + * * @return A String representing the base path log files produced by annotated services should be streamed. */ String output() default ServiceLogsSettings.UNASSIGNED; diff --git a/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogs.java b/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogs.java index 3f35ca90..08b6cd11 100644 --- a/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogs.java +++ b/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogs.java @@ -93,7 +93,7 @@ public Builder inNamespaces(final List namespaces) { /** * Gets a {@link PrintStream} instance that will be passed on and used by the {@link PodLogs} instance - * + * * @param printStream A {@link PrintStream} instance which will be used for streaming the service logs. * It is expected that the {@link PrintStream} instance life cycle will be handled * at the outer scope level, in the context and by the component which created it. diff --git a/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogsWatcher.java b/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogsWatcher.java index 3ac9cd7c..ca5d201b 100644 --- a/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogsWatcher.java +++ b/core/src/main/java/cz/xtf/core/service/logs/streaming/k8s/PodLogsWatcher.java @@ -54,7 +54,7 @@ protected PodLogsWatcher(KubernetesClient client, String namespace, PrintStream /** * Handles newly running containers - * + * * @param pod the Pod where to look for newly running containers */ private void handleNewRunningContainers(Pod pod) { @@ -128,7 +128,7 @@ private String forgeContainerLogPrefix(Pod pod, ContainerStatus status) { /** * Handles newly terminated containers - * + * * @param pod the Pod where to look for newly terminated containers */ private void handleNewTerminatedContainers(Pod pod) { @@ -189,7 +189,7 @@ public void eventReceived(Action action, Pod pod) { /** * Gets just new containers statuses by filtering the existing ones out. - * + * * @param before A list of {@link ContainerStatus} instances belonging to already existing containers * @param now A list of {@link ContainerStatus} instances belonging to new containers * @return A list of {@link ContainerStatus} instances representing the difference between those belonging to diff --git a/core/src/main/java/cz/xtf/core/waiting/failfast/EventFailFastCheckBuilder.java b/core/src/main/java/cz/xtf/core/waiting/failfast/EventFailFastCheckBuilder.java index e6f91551..609ee912 100644 --- a/core/src/main/java/cz/xtf/core/waiting/failfast/EventFailFastCheckBuilder.java +++ b/core/src/main/java/cz/xtf/core/waiting/failfast/EventFailFastCheckBuilder.java @@ -86,7 +86,7 @@ public EventFailFastCheckBuilder ofMessages(String... messages) { /** * If at least one event exist (after filtration), final function returns true. - * + * * @return this */ public FailFastBuilder atLeastOneExists() { diff --git a/core/src/main/java/cz/xtf/core/waiting/failfast/FailFastBuilder.java b/core/src/main/java/cz/xtf/core/waiting/failfast/FailFastBuilder.java index 984b5d8b..6b518839 100644 --- a/core/src/main/java/cz/xtf/core/waiting/failfast/FailFastBuilder.java +++ b/core/src/main/java/cz/xtf/core/waiting/failfast/FailFastBuilder.java @@ -14,7 +14,7 @@ * If it returns true, the waiter should throw an exception. *

* Example of use: - * + * *

  * FailFastBuilder
  *         .ofTestAndBuildNamespace()
diff --git a/http-client/src/main/java/cz/xtf/client/HttpWaiters.java b/http-client/src/main/java/cz/xtf/client/HttpWaiters.java
index 0c2bc9b8..780e095b 100644
--- a/http-client/src/main/java/cz/xtf/client/HttpWaiters.java
+++ b/http-client/src/main/java/cz/xtf/client/HttpWaiters.java
@@ -42,6 +42,6 @@ public Waiter responseContains(final String... strings) {
         };
         return new SimpleWaiter(bs,
                 "Waiting for " + client.getUrl().toExternalForm() + " to contain (" + String.join(",", strings) + ")")
-                        .timeout(WaitingConfig.timeout());
+                .timeout(WaitingConfig.timeout());
     }
 }
diff --git a/junit5/src/main/java/cz/xtf/junit5/extensions/ServiceLogsStreamingRunner.java b/junit5/src/main/java/cz/xtf/junit5/extensions/ServiceLogsStreamingRunner.java
index 989fc5b4..c02a962e 100644
--- a/junit5/src/main/java/cz/xtf/junit5/extensions/ServiceLogsStreamingRunner.java
+++ b/junit5/src/main/java/cz/xtf/junit5/extensions/ServiceLogsStreamingRunner.java
@@ -160,7 +160,7 @@ private Map serviceLogs(ExtensionContext extensionContext)
     /**
      * Access the execution context {@link OutputStream} instances that represent the output of existing
      * {@link ServiceLogs} instances
-     * 
+     *
      * @param extensionContext The current test execution context
      * @return A list of {@link OutputStream} instances that represent the output of existing {@link ServiceLogs}
      *         instances
diff --git a/junit5/src/main/java/cz/xtf/junit5/listeners/ManagedBuildPrebuilder.java b/junit5/src/main/java/cz/xtf/junit5/listeners/ManagedBuildPrebuilder.java
index b70c6ee6..598294f1 100644
--- a/junit5/src/main/java/cz/xtf/junit5/listeners/ManagedBuildPrebuilder.java
+++ b/junit5/src/main/java/cz/xtf/junit5/listeners/ManagedBuildPrebuilder.java
@@ -60,9 +60,9 @@ public void testPlanExecutionStarted(TestPlan testPlan) {
         Waiter runningBuildsBelowCapacity = new SimpleWaiter(() -> buildManagerOpenShift.getBuilds().stream()
                 .filter(build -> build.getStatus() != null && "Running".equals(build.getStatus().getPhase()))
                 .count() < BuildManagerConfig.maxRunningBuilds())
-                        .timeout(TimeUnit.MILLISECONDS, WaitingConfig.timeout())
-                        .reason("Waiting for a free capacity for running builds in " + BuildManagerConfig.namespace()
-                                + " namespace.");
+                .timeout(TimeUnit.MILLISECONDS, WaitingConfig.timeout())
+                .reason("Waiting for a free capacity for running builds in " + BuildManagerConfig.namespace()
+                        + " namespace.");
 
         for (final BuildDefinition buildDefinition : buildsToBeBuilt) {
             // lazy creation, so that we don't attempt to create a buildmanager namespace when no builds defined (e.g. OSO tests)
diff --git a/junit5/src/main/java/cz/xtf/junit5/model/DockerImageMetadata.java b/junit5/src/main/java/cz/xtf/junit5/model/DockerImageMetadata.java
index d0fd1b64..7c9da6c3 100644
--- a/junit5/src/main/java/cz/xtf/junit5/model/DockerImageMetadata.java
+++ b/junit5/src/main/java/cz/xtf/junit5/model/DockerImageMetadata.java
@@ -91,7 +91,7 @@ private static DockerImageMetadata getMetadata(OpenShift openShift, Image image)
         Waiter metadataWaiter = new SimpleWaiter(
                 () -> DockerImageMetadata.areMetadataForImageReady(openShift.getImageStreamTag(tempName, image.getMajorTag())),
                 "Giving OpenShift instance time to download image metadata.")
-                        .failFast(new ImageStreamFailFastCheck(openShift, tempName, image));
+                .failFast(new ImageStreamFailFastCheck(openShift, tempName, image));
         boolean metadataOK = metadataWaiter.waitFor();
 
         // delete unique image stream and return metadata
diff --git a/pom.xml b/pom.xml
index ccd586e3..83f55fa6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -285,7 +285,7 @@
             
                 net.revelc.code.formatter
                 formatter-maven-plugin
-                2.11.0
+                2.22.0
                 
                     ${maven.multiModuleProjectDirectory}/ide-config/eclipse-format.xml