Skip to content

Commit

Permalink
Add Sonar badges, remove dead code flagged as unreliable by Sonar (#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar authored Jul 26, 2022
1 parent e8da621 commit 5342da0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bf2fc6cc711aee1a0c2a_kafka-admin-api&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=bf2fc6cc711aee1a0c2a_kafka-admin-api)[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bf2fc6cc711aee1a0c2a_kafka-admin-api&metric=coverage)](https://sonarcloud.io/summary/new_code?id=bf2fc6cc711aee1a0c2a_kafka-admin-api)

# Managed Kafka Admin API

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package org.bf2.admin.kafka.systemtest.utils;

import org.bf2.admin.kafka.systemtest.Environment;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.extension.ExtensionContext;

import java.nio.file.Path;
import java.nio.file.Paths;

public class TestUtils {
protected static final Logger LOGGER = Logger.getLogger(TestUtils.class);
Expand All @@ -21,18 +16,4 @@ public static void logDeploymentPhase(String text) {
LOGGER.info(text);
LOGGER.info("-----------------------------------------");
}

public static Path getLogPath(String folderName, ExtensionContext context) {
String testMethod = context.getDisplayName();
Class<?> testClass = context.getTestClass().get();
return getLogPath(folderName, testClass, testMethod);
}

public static Path getLogPath(String folderName, Class<?> testClass, String testMethod) {
Path path = Environment.LOG_DIR.resolve(Paths.get(folderName, testClass.getName()));
if (testMethod != null) {
path = path.resolve(testMethod.replace("(", "").replace(")", ""));
}
return path;
}
}

0 comments on commit 5342da0

Please sign in to comment.