Skip to content

Commit

Permalink
Slim down log output and amp up number of tests for troubleshooting
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Sep 22, 2023
1 parent 01c48d1 commit 5f9002f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
number: [1,2,3,4,5,6,7,8,9] # Making sure these tests aren't flaky
jdk: [11, 17]
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
Expand All @@ -97,6 +98,9 @@ jobs:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.jdk }}

- if: ${{ runner.os == 'Windows' }}
run: tracert www.google.com

- name: Checkout security
uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ sourceSets {
srcDir file ('src/integrationTest/java')
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output

}
resources {
srcDir file('src/integrationTest/resources')
Expand All @@ -474,6 +475,7 @@ task integrationTest(type: Test) {
systemProperty "java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
jvmArgs += "-Djdk.internal.httpclient.disableHostnameVerification"
retry {
failOnPassedAfterRetry = false
maxRetries = 2
Expand Down
28 changes: 17 additions & 11 deletions src/integrationTest/resources/log4j2-test.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
status = info
status = warn
name = Integration test logging configuration
packages = org.opensearch.test.framework.log

Expand All @@ -14,31 +14,37 @@ appender.console.filter.prerelease.onMismatch=NEUTRAL
appender.capturing.type = LogCapturingAppender
appender.capturing.name = logCapturingAppender

rootLogger.level = info
rootLogger.level = warn
rootLogger.appenderRef.stdout.ref = consoleAppender

logger.testsecconfig.name = org.opensearch.test.framework.TestSecurityConfig
logger.testsecconfig.level = info
logger.testsecconfig.level = warn
logger.localopensearchcluster.name=org.opensearch.test.framework.cluster.LocalOpenSearchCluster
logger.localopensearchcluster.level = info
logger.localopensearchcluster.level = warn

logger.auditlogs.name=org.opensearch.test.framework.audit
logger.auditlogs.level = info
logger.auditlogs.level = warn

# Logger required by test org.opensearch.security.http.JwtAuthenticationTests
logger.httpjwtauthenticator.name = com.amazon.dlic.auth.http.jwt.HTTPJwtAuthenticator
logger.httpjwtauthenticator.level = debug
logger.httpjwtauthenticator.appenderRef.capturing.ref = logCapturingAppender
logger.httpjwtauthenticator.level = warn
#logger.httpjwtauthenticator.appenderRef.capturing.ref = logCapturingAppender

#Required by tests:
# org.opensearch.security.IpBruteForceAttacksPreventionTests
# org.opensearch.security.UserBruteForceAttacksPreventionTests
logger.backendreg.name = org.opensearch.security.auth.BackendRegistry
logger.backendreg.level = debug
logger.backendreg.appenderRef.capturing.ref = logCapturingAppender
logger.backendreg.level = warn
#logger.backendreg.appenderRef.capturing.ref = logCapturingAppender

#com.amazon.dlic.auth.ldap
#logger.ldap.name=com.amazon.dlic.auth.ldap.backend.LDAPAuthenticationBackend
logger.ldap.name=com.amazon.dlic.auth.ldap.backend
logger.ldap.level=TRACE
logger.ldap.appenderRef.capturing.ref = logCapturingAppender
logger.ldap.level=warn
#logger.ldap.appenderRef.capturing.ref = logCapturingAppender

logger.securesslsettings.name=org.opensearch.security.ssl.SecureSSLSettings
logger.securesslsettings.level=error

logger.auditmessagerouter.name=org.opensearch.security.auditlog.routing.AuditMessageRouter
logger.auditmessagerouter.level=error

0 comments on commit 5f9002f

Please sign in to comment.