Skip to content

Commit

Permalink
Fix checkstyle issue
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Oct 26, 2022
1 parent d2a8952 commit 49016cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test {
}
retry {
failOnPassedAfterRetry = false
maxRetries = 5
// maxRetries = 5
}
jacoco {
excludes = [
Expand Down Expand Up @@ -376,6 +376,11 @@ dependencies {
runtimeOnly 'org.apache.santuario:xmlsec:2.2.3'
runtimeOnly 'com.github.luben:zstd-jni:1.5.0-2'
runtimeOnly 'org.checkerframework:checker-qual:3.5.0'
// testRuntimeOnly 'io.netty:netty-tcnative:2.0.54.Final:windows-x86_64'
// runtimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final'
// testRuntimeOnly "io.netty:netty-all:${versions.netty}"
testRuntimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final:windows-x86_64'



implementation 'org.apache.commons:commons-lang3:3.4'
Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/opensearch/security/ssl/OpenSSLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.Set;

import io.netty.handler.ssl.OpenSsl;
import io.netty.util.internal.PlatformDependent;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Assume;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public static Path getAbsoluteFilePathFromClassPath(final String fileNameFromCla
public static final String loadFile(final String file) throws IOException {
final StringWriter sw = new StringWriter();
IOUtils.copy(FileHelper.class.getResourceAsStream("/" + file), sw, StandardCharsets.UTF_8);
// System.err.println("Loaded file + " + file + "\r\n\r\n" + sw.toString());
return sw.toString();
}

Expand All @@ -108,6 +109,8 @@ public static BytesReference readYamlContent(final String file) {
parser.nextToken();
final XContentBuilder builder = XContentFactory.jsonBuilder();
builder.copyCurrentStructure(parser);
// Reproduction
System.err.println("Builder: " + file + "\r\n\r\n" + new String(BytesReference.toBytes(BytesReference.bytes(builder))));
return BytesReference.bytes(builder);
} catch (Exception e) {
throw new RuntimeException(e);
Expand All @@ -131,6 +134,7 @@ public static BytesReference readYamlContentFromString(final String yaml) {
parser.nextToken();
final XContentBuilder builder = XContentFactory.jsonBuilder();
builder.copyCurrentStructure(parser);
System.err.println("Builder " + builder.toString());
return BytesReference.bytes(builder);
} catch (Exception e) {
throw new RuntimeException(e);
Expand Down
4 changes: 3 additions & 1 deletion src/test/resources/log4j2-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ appender.file.layout.type=PatternLayout
appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n


rootLogger.level = warn
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
rootLogger.appenderRef.file.ref = LOGFILE

Expand All @@ -22,6 +22,8 @@ rootLogger.appenderRef.file.ref = LOGFILE

#logger.pe.name = org.opensearch.security.configuration.PrivilegesEvaluator
#logger.pe.level = trace
logger.br.name = org.opensearch.security.auth.BackendRegistry
logger.br.level = trace

logger.cas.name = org.opensearch.cluster.service.ClusterApplierService
logger.cas.level = error
Expand Down

0 comments on commit 49016cd

Please sign in to comment.