Skip to content

Commit 072c512

Browse files
committed
Correctly log
1 parent 27c1024 commit 072c512

File tree

3 files changed

+24
-12
lines changed
  • demo/integration-tests
    • tci-webapp/src/main/java/software/xdev/sse/demo/tci/webapp/containers
    • webapp-rest-it/src/test/java/software/xdev/sse/demo/rest/base
    • webapp-vaadin-it/src/test/java/software/xdev/sse/demo/vaadin/base

3 files changed

+24
-12
lines changed

demo/integration-tests/tci-webapp/src/main/java/software/xdev/sse/demo/tci/webapp/containers/WebAppContainer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ protected WebAppContainer(final String dockerImageName, final boolean connection
2727
this.addExposedPort(DEFAULT_HTTP_PORT);
2828
}
2929

30+
public SELF withDebugRootLogger()
31+
{
32+
// Root logger level in Production = INFO and in dev-log = DEBUG
33+
// -> Clashes and "random" log level is selected causing inconsistent behavior
34+
// -> Set explicitly
35+
return this.withEnv("LOGGING_LEVEL_ROOT", "debug");
36+
}
37+
3038
public SELF withDB(final String jdbcUrl, final String username, final String password)
3139
{
3240
return this.withEnv("SPRING_DATASOURCE_URL", jdbcUrl)

demo/integration-tests/webapp-rest-it/src/test/java/software/xdev/sse/demo/rest/base/BaseTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
abstract class BaseTest extends AbstractBaseTest<RestWebAppTCI>
1212
{
1313
protected static final RestWebAppTCIFactory APP_INFRA_FACTORY =
14-
new RestWebAppTCIFactory(c -> c.withDB(
14+
new RestWebAppTCIFactory(c -> c
15+
.withDebugRootLogger()
16+
.withDB(
1517
DBTCI.getInternalJDBCUrl(DNS_NAME_DB),
1618
DBTCI.DB_USERNAME,
1719
DBTCI.DB_PASSWORD

demo/integration-tests/webapp-vaadin-it/src/test/java/software/xdev/sse/demo/vaadin/base/BaseTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@
2020
@SuppressWarnings("java:S1117")
2121
abstract class BaseTest extends AbstractBaseTest<VaadinWebAppTCI>
2222
{
23-
protected static final Consumer<VaadinWebAppContainer>
24-
APP_CONTAINER_BUILDER = c -> c.withDB(
25-
DBTCI.getInternalJDBCUrl(DNS_NAME_DB),
26-
DBTCI.DB_USERNAME,
27-
DBTCI.DB_PASSWORD
28-
)
29-
.withAuth(
30-
OIDCTCI.CLIENT_ID,
31-
OIDCTCI.CLIENT_SECRET,
32-
OIDCTCI.getInternalHttpBaseEndPoint(DNS_NAME_OIDC)
33-
);
23+
protected static final Consumer<VaadinWebAppContainer> APP_CONTAINER_BUILDER =
24+
c -> c
25+
.withDebugRootLogger()
26+
.withDB(
27+
DBTCI.getInternalJDBCUrl(DNS_NAME_DB),
28+
DBTCI.DB_USERNAME,
29+
DBTCI.DB_PASSWORD
30+
)
31+
.withAuth(
32+
OIDCTCI.CLIENT_ID,
33+
OIDCTCI.CLIENT_SECRET,
34+
OIDCTCI.getInternalHttpBaseEndPoint(DNS_NAME_OIDC)
35+
);
3436
protected static final VaadinWebAppPreStartableTCIFactory APP_INFRA_FACTORY =
3537
new VaadinWebAppPreStartableTCIFactory(APP_CONTAINER_BUILDER);
3638

0 commit comments

Comments
 (0)