-
Notifications
You must be signed in to change notification settings - Fork 217
Changes to log messages into individual log file for each It class #1765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…es-operator into junit5-tests-parallel
…es-operator into junit5-tests-parallel
fix Nginx clusterrole and node port conflicts
@@ -34,7 +34,9 @@ | |||
import oracle.weblogic.kubernetes.annotations.Namespaces; | |||
import oracle.weblogic.kubernetes.annotations.tags.MustNotRunInParallel; | |||
import oracle.weblogic.kubernetes.annotations.tags.Slow; | |||
import oracle.weblogic.kubernetes.extensions.LoggedTest; | |||
//import oracle.weblogic.kubernetes.extensions.LoggedTest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out import
@@ -107,6 +109,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(2) List<String> namespaces) { | |||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -118,6 +120,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(2) List<String> namespaces) { | |||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -132,6 +135,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(3) List<String> namespaces) { | |||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -119,7 +122,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(2) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -89,7 +91,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(5) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -184,7 +187,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(6) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -129,7 +131,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(4) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -80,7 +82,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(2) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -100,6 +102,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void init(@Namespaces(2) List<String> namespaces) { | |||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -61,27 +62,31 @@ | |||
import static org.junit.jupiter.api.Assertions.assertNotNull; | |||
import static org.junit.jupiter.api.Assertions.assertTrue; | |||
|
|||
//import oracle.weblogic.kubernetes.extensions.LoggedTest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out import
/** | ||
* Setup for test suite. Creates service account, persistent volume | ||
* and persistent volume claim. | ||
* @param namespaces injected by JUnit extension | ||
*/ | ||
@BeforeAll | ||
public void setup(@Namespaces(2) List<String> namespaces) { | ||
|
||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
@@ -232,7 +237,7 @@ public void testInstallingOperator() { | |||
/** | |||
* Create domain. | |||
*/ | |||
@Test | |||
//@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either enable the test or delete this test method
@@ -98,7 +100,7 @@ | |||
*/ | |||
@BeforeAll | |||
public static void initAll(@Namespaces(3) List<String> namespaces) { | |||
|
|||
logger = ThreadSafeLogger.getLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can static import ThreadSafeLogger.getLogger then just call getLogger() here like in other It* classes.
new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java
Show resolved
Hide resolved
new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java
Show resolved
Hide resolved
new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java
Show resolved
Hide resolved
new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java
Show resolved
Hide resolved
new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Domain.java
Show resolved
Hide resolved
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static org.junit.jupiter.api.extension.ExtensionContext.Namespace.GLOBAL; | ||
|
||
//import oracle.weblogic.kubernetes.logging.LoggingFacade; | ||
//import static oracle.weblogic.kubernetes.extensions.LoggedTest.logger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out imports
|
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is mainly for logging messages. There are failures when tests ran in parallel which needs to be looked into. There will be a separate PR to make the tests work when run in parallel.
Jenkins Results -- intermittent failures not related to the changes in the PR
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/529/
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-model-in-image-tests-1/48/