Skip to content

Commit

Permalink
Fix spotbugs
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
  • Loading branch information
Frawless committed May 23, 2024
1 parent 5402f55 commit 99b94a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.logging.log4j.Logger;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

Expand Down Expand Up @@ -120,7 +121,7 @@ public static void buildImageKaniko(String name, String namespace, String docker
* @throws IOException
*/
public static void buildImageOpenshift(String name, String namespace, String dockerfilePath, String imageTag, String baseImage) throws IOException {
String dockerfileContent = new String(Files.readAllBytes(Paths.get(dockerfilePath)));
String dockerfileContent = Files.readString(Paths.get(dockerfilePath), StandardCharsets.UTF_8);

BuildConfig buildConfig = new BuildConfigBuilder()
.withNewMetadata()
Expand Down Expand Up @@ -176,7 +177,7 @@ public static void buildImageOpenshift(String name, String namespace, String doc
* @throws IOException
*/
private static void createDockerfileConfigMap(String namespace, String configMapName, String dockerfilePath) throws IOException {
String dockerfileContent = new String(Files.readAllBytes(Paths.get(dockerfilePath)));
String dockerfileContent = Files.readString(Paths.get(dockerfilePath), StandardCharsets.UTF_8);

ConfigMap configMap = new ConfigMapBuilder()
.withNewMetadata()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,18 @@ void testTieredStorageWithAivenPlugin() {
.build());

final KafkaClients clients = ClientUtils.getInstantPlainClientBuilder(testStorage)
.withMessageCount(10000000)
.withMessageCount(10000)
.withDelayMs(1)
.withMessage(String.join("", Collections.nCopies(5000, "#")))
.build();

resourceManager.createResourceWithWait(clients.producerStrimzi());

SetupMinio.waitForDataInMinio(testStorage.getNamespaceName(), BUCKET_NAME);
ClientUtils.waitForInstantProducerClientSuccess(testStorage);

resourceManager.createResourceWithWait(clients.consumerStrimzi());
ClientUtils.waitForInstantConsumerClientSuccess(testStorage);
}

@BeforeAll
Expand Down

0 comments on commit 99b94a4

Please sign in to comment.