diff --git a/.github/workflows/docker-image-ci.yml b/.github/workflows/docker-image-ci.yml index 4362b65f6..bc27be400 100644 --- a/.github/workflows/docker-image-ci.yml +++ b/.github/workflows/docker-image-ci.yml @@ -77,7 +77,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/nginx - args: --severity-threshold=high --file=kubernetes/nginx/Dockerfile + args: --severity-threshold=critical --file=kubernetes/nginx/Dockerfile - name: rename sarif file run: mv snyk.sarif nginx.sarif @@ -100,7 +100,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/mysql - args: --severity-threshold=high --file=kubernetes/mysql/Dockerfile + args: --severity-threshold=critical --file=kubernetes/mysql/Dockerfile - name: rename sarif file run: mv snyk.sarif mysql.sarif @@ -123,7 +123,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/postgres - args: --severity-threshold=high --file=kubernetes/postgres/Dockerfile + args: --severity-threshold=critical --file=kubernetes/postgres/Dockerfile - name: rename sarif file run: mv snyk.sarif postgres.sarif @@ -146,7 +146,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/mongodb - args: --severity-threshold=high --file=kubernetes/mongodb/Dockerfile + args: --severity-threshold=critical --file=kubernetes/mongodb/Dockerfile - name: rename sarif file run: mv snyk.sarif mongodb.sarif @@ -169,7 +169,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/cassandra - args: --severity-threshold=high --file=kubernetes/cassandra/Dockerfile + args: --severity-threshold=critical --file=kubernetes/cassandra/Dockerfile - name: rename sarif file run: mv snyk.sarif cassandra.sarif @@ -192,7 +192,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/rabbitmq - args: --severity-threshold=high --file=kubernetes/rabbitmq/Dockerfile + args: --severity-threshold=critical --file=kubernetes/rabbitmq/Dockerfile - name: rename sarif file run: mv snyk.sarif rabbitmq.sarif @@ -215,7 +215,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/jenkins - args: --severity-threshold=high --file=kubernetes/monitoring/jenkins/Dockerfile + args: --severity-threshold=critical --file=kubernetes/monitoring/jenkins/Dockerfile - name: rename sarif file run: mv snyk.sarif jenkins.sarif @@ -238,7 +238,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/ab - args: --severity-threshold=high --file=kubernetes/monitoring/test/ab/Dockerfile + args: --severity-threshold=critical --file=kubernetes/monitoring/test/ab/Dockerfile - name: rename sarif file run: mv snyk.sarif ab.sarif @@ -261,7 +261,7 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: image: ${{ secrets.DOCKERHUB_USER }}/postmannewman-quarkus - args: --severity-threshold=high --file=kubernetes/monitoring/test/postmannewman/quarkus/Dockerfile + args: --severity-threshold=critical --file=kubernetes/monitoring/test/postmannewman/quarkus/Dockerfile - name: rename sarif file run: mv snyk.sarif postmannewman-quarkus.sarif diff --git a/application/consumer-activemq-quarkus/src/main/java/webapp/tier/service/ActiveMqSubscribeService.java b/application/consumer-activemq-quarkus/src/main/java/webapp/tier/service/ActiveMqSubscribeService.java index 496008a2b..5384dce65 100644 --- a/application/consumer-activemq-quarkus/src/main/java/webapp/tier/service/ActiveMqSubscribeService.java +++ b/application/consumer-activemq-quarkus/src/main/java/webapp/tier/service/ActiveMqSubscribeService.java @@ -51,6 +51,7 @@ public static void stopReceived() { ActiveMqSubscribeService.isEnableReceived = false; } + @Override public void run() { while (isEnableReceived) { try (JMSContext context = connectionFactory diff --git a/application/consumer-activemq-quarkus/src/main/resources/application.properties b/application/consumer-activemq-quarkus/src/main/resources/application.properties index 81d169028..ed4b8e2a2 100644 --- a/application/consumer-activemq-quarkus/src/main/resources/application.properties +++ b/application/consumer-activemq-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-activemq-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/consumer-hazelcast-quarkus/src/main/resources/application.properties b/application/consumer-hazelcast-quarkus/src/main/resources/application.properties index 9744b12e4..b5329d927 100644 --- a/application/consumer-hazelcast-quarkus/src/main/resources/application.properties +++ b/application/consumer-hazelcast-quarkus/src/main/resources/application.properties @@ -15,6 +15,7 @@ quarkus.jaeger.service-name=consumer-hazelcast-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/consumer-kafka-quarkus/src/main/resources/application.properties b/application/consumer-kafka-quarkus/src/main/resources/application.properties index 8833e775f..f59b4d4d6 100644 --- a/application/consumer-kafka-quarkus/src/main/resources/application.properties +++ b/application/consumer-kafka-quarkus/src/main/resources/application.properties @@ -31,3 +31,4 @@ quarkus.jaeger.service-name=consumer-kafka-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false diff --git a/application/consumer-rabbitmq-quarkus/src/main/resources/application.properties b/application/consumer-rabbitmq-quarkus/src/main/resources/application.properties index 5ee23766e..38a5e3d5a 100644 --- a/application/consumer-rabbitmq-quarkus/src/main/resources/application.properties +++ b/application/consumer-rabbitmq-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-rabbitmq-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/consumer-redis-quarkus/src/main/resources/application.properties b/application/consumer-redis-quarkus/src/main/resources/application.properties index 95a45b772..5333b76d1 100644 --- a/application/consumer-redis-quarkus/src/main/resources/application.properties +++ b/application/consumer-redis-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=consumer-redis-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/converter-kafka-quarkus/src/main/resources/application.properties b/application/converter-kafka-quarkus/src/main/resources/application.properties index 3f905298d..76027cf77 100644 --- a/application/converter-kafka-quarkus/src/main/resources/application.properties +++ b/application/converter-kafka-quarkus/src/main/resources/application.properties @@ -28,3 +28,4 @@ quarkus.jaeger.service-name=converter-kafka-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false diff --git a/application/converter-rabbitmq-quarkus/src/main/resources/application.properties b/application/converter-rabbitmq-quarkus/src/main/resources/application.properties index c4d08fb86..86aff8d74 100644 --- a/application/converter-rabbitmq-quarkus/src/main/resources/application.properties +++ b/application/converter-rabbitmq-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=converter-rabbitmq-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-activemq-quarkus/src/main/resources/application.properties b/application/jaxrs-activemq-quarkus/src/main/resources/application.properties index 08daf4b7e..a272a94d3 100644 --- a/application/jaxrs-activemq-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-activemq-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-activemq-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java similarity index 89% rename from application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java rename to application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java index 1b2769320..024339b91 100644 --- a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java +++ b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java @@ -1,7 +1,7 @@ package webapp.tier.service.socket; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.*; import java.net.URI; import java.util.concurrent.LinkedBlockingDeque; @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class ActiveMqSocketTestForQuarkus { +class ActiveMqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); @@ -29,7 +29,7 @@ class ActiveMqSocketTestForQuarkus { URI uri; @Test - public void testOnMessage() throws Exception { + void testOnMessage() throws Exception { try (Session session = ContainerProvider.getWebSocketContainer() .connectToServer(Client.class, uri)) { assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT")); diff --git a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTest.java b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTest.java index 4cd77fc54..c772b7c9a 100644 --- a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTest.java +++ b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTest.java @@ -10,7 +10,6 @@ import javax.websocket.Session; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import io.quarkus.test.junit.QuarkusTest; diff --git a/application/jaxrs-cassandra-quarkus/src/main/resources/application.properties b/application/jaxrs-cassandra-quarkus/src/main/resources/application.properties index 9d725d325..3ab0737c1 100644 --- a/application/jaxrs-cassandra-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-cassandra-quarkus/src/main/resources/application.properties @@ -13,7 +13,7 @@ quarkus.jaeger.service-name=jaxrs-cassandra-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 -%test.quarkus.jaeger.agent-host-port=localhost:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-grpc-quarkus/src/main/resources/application.properties b/application/jaxrs-grpc-quarkus/src/main/resources/application.properties index 26cff764b..33378099f 100644 --- a/application/jaxrs-grpc-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-grpc-quarkus/src/main/resources/application.properties @@ -17,8 +17,7 @@ quarkus.jaeger.service-name=jaxrs-grpc-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 -%dev.quarkus.jaeger.agent-host-port=localhost:6831 -%test.quarkus.jaeger.agent-host-port=localhost:6831 +%test.quarkus.jaeger.enabled=false # grpc quarkus.grpc.clients.id.host=server-grpc-quarkus diff --git a/application/jaxrs-hazelcast-quarkus/src/main/resources/application.properties b/application/jaxrs-hazelcast-quarkus/src/main/resources/application.properties index d02e5f306..a5250f546 100644 --- a/application/jaxrs-hazelcast-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-hazelcast-quarkus/src/main/resources/application.properties @@ -15,7 +15,7 @@ quarkus.jaeger.service-name=jaxrs-hazelcast-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 -%test.quarkus.jaeger.agent-host-port=localhost:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/healthcheck/ReadinessHealthCheckHazelcastTest.java b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/healthcheck/ReadinessHealthCheckHazelcastTest.java index 3ddbb7c07..e8e4e86ad 100644 --- a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/healthcheck/ReadinessHealthCheckHazelcastTest.java +++ b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/healthcheck/ReadinessHealthCheckHazelcastTest.java @@ -10,7 +10,6 @@ import org.eclipse.microprofile.health.HealthCheckResponse.Status; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import io.quarkus.test.junit.QuarkusTest; import webapp.tier.service.HazelcastServiceStatus; @@ -27,6 +26,7 @@ void testCallDown() { @Test void testCallUp() throws IOException, TimeoutException { ReadinessHealthCheckHazelcast hc = new ReadinessHealthCheckHazelcast() { + @Override protected HazelcastServiceStatus createHazelcastStatus() { HazelcastServiceStatus mock = mock(HazelcastServiceStatus.class); when(mock.isActive()).thenReturn(true); diff --git a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java similarity index 89% rename from application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java rename to application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java index a0687aa21..7f39af5d2 100644 --- a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java +++ b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java @@ -1,7 +1,7 @@ package webapp.tier.service.socket; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.*; import java.net.URI; import java.util.concurrent.LinkedBlockingDeque; @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class HazelcastSocketTestForQuarkus { +class HazelcastSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); @@ -29,7 +29,7 @@ class HazelcastSocketTestForQuarkus { URI uri; @Test - public void testOmMessage() throws Exception { + void testOmMessage() throws Exception { try (Session session = ContainerProvider.getWebSocketContainer() .connectToServer(Client.class, uri)) { assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT")); diff --git a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTest.java b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTest.java index c7e5cc2a0..84288a280 100644 --- a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTest.java +++ b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTest.java @@ -10,7 +10,6 @@ import javax.websocket.Session; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import io.quarkus.test.junit.QuarkusTest; diff --git a/application/jaxrs-kafka-quarkus/src/main/resources/application.properties b/application/jaxrs-kafka-quarkus/src/main/resources/application.properties index e80953f22..e702e3b9c 100644 --- a/application/jaxrs-kafka-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-kafka-quarkus/src/main/resources/application.properties @@ -31,3 +31,4 @@ quarkus.jaeger.service-name=jaxrs-kafka-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false diff --git a/application/jaxrs-memcached-quarkus/src/main/resources/application.properties b/application/jaxrs-memcached-quarkus/src/main/resources/application.properties index 2bf1df8db..e0879ec39 100644 --- a/application/jaxrs-memcached-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-memcached-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-memcached-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-memcached-quarkus/src/test/java/webapp/tier/service/MemcachedServiceTest.java b/application/jaxrs-memcached-quarkus/src/test/java/webapp/tier/service/MemcachedServiceTest.java index 4ce5e42b7..a46cadedb 100644 --- a/application/jaxrs-memcached-quarkus/src/test/java/webapp/tier/service/MemcachedServiceTest.java +++ b/application/jaxrs-memcached-quarkus/src/test/java/webapp/tier/service/MemcachedServiceTest.java @@ -9,7 +9,6 @@ import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatchers; -import org.mockito.Mockito; import com.whalin.MemCached.MemCachedClient; diff --git a/application/jaxrs-mongodb-quarkus/src/main/resources/application.properties b/application/jaxrs-mongodb-quarkus/src/main/resources/application.properties index 6d26ff68f..248c7b131 100644 --- a/application/jaxrs-mongodb-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-mongodb-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-mongodb-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java b/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java index 45c0f02ff..58c442d87 100644 --- a/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java +++ b/application/jaxrs-mysql-quarkus/src/main/java/webapp/tier/service/MysqlService.java @@ -47,7 +47,8 @@ public class MysqlService implements Database { public boolean connectionStatus() { boolean status = false; - try (Connection con = ds.getConnection()) { + try { + ds.getConnection(); status = true; } catch (SQLException | NullPointerException e) { logger.log(Level.SEVERE, "Status Check Error.", e); diff --git a/application/jaxrs-mysql-quarkus/src/main/resources/application.properties b/application/jaxrs-mysql-quarkus/src/main/resources/application.properties index 20313d3c2..aeab596e5 100644 --- a/application/jaxrs-mysql-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-mysql-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-mysql-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-postgres-quarkus/src/main/java/webapp/tier/service/PostgresService.java b/application/jaxrs-postgres-quarkus/src/main/java/webapp/tier/service/PostgresService.java index 8c6b78bef..fdbea6054 100644 --- a/application/jaxrs-postgres-quarkus/src/main/java/webapp/tier/service/PostgresService.java +++ b/application/jaxrs-postgres-quarkus/src/main/java/webapp/tier/service/PostgresService.java @@ -45,7 +45,8 @@ public class PostgresService implements Database { public boolean connectionStatus() { boolean status = false; - try (Connection con = ds.getConnection()) { + try { + ds.getConnection(); status = true; } catch (SQLException | NullPointerException e) { logger.log(Level.SEVERE, "Status Check Error.", e); diff --git a/application/jaxrs-postgres-quarkus/src/main/resources/application.properties b/application/jaxrs-postgres-quarkus/src/main/resources/application.properties index 88f362ea2..dc7284674 100644 --- a/application/jaxrs-postgres-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-postgres-quarkus/src/main/resources/application.properties @@ -13,6 +13,7 @@ quarkus.jaeger.service-name=jaxrs-postgres-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-rabbitmq-quarkus/src/main/resources/application.properties b/application/jaxrs-rabbitmq-quarkus/src/main/resources/application.properties index 7667b521d..32a3b9967 100644 --- a/application/jaxrs-rabbitmq-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-rabbitmq-quarkus/src/main/resources/application.properties @@ -10,11 +10,10 @@ quarkus.log.category."io.quarkus".level=INFO # Opentracing quarkus.jaeger.service-name=jaxrs-rabbitmq-quarkus -%dev.quarkus.jaeger.service-name=localhost -%test.quarkus.jaeger.service-name=localhost quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java similarity index 89% rename from application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java rename to application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java index efd14c583..dda7a0cc3 100644 --- a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java +++ b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java @@ -1,7 +1,7 @@ package webapp.tier.service.socket; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.MatcherAssert.*; import java.net.URI; import java.util.concurrent.LinkedBlockingDeque; @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class RabbitmqSocketTestForQuarkus { +class RabbitmqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); @@ -29,7 +29,7 @@ class RabbitmqSocketTestForQuarkus { URI uri; @Test - public void testOmMessage() throws Exception { + void testOmMessage() throws Exception { try (Session session = ContainerProvider.getWebSocketContainer() .connectToServer(Client.class, uri)) { assertThat(MESSAGES.poll(10, TimeUnit.SECONDS), is("CONNECT")); diff --git a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTest.java b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTest.java index 7415d7eae..427cb4fa6 100644 --- a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTest.java +++ b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTest.java @@ -10,7 +10,6 @@ import javax.websocket.Session; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import io.quarkus.test.junit.QuarkusTest; diff --git a/application/jaxrs-redis-quarkus/src/main/resources/application.properties b/application/jaxrs-redis-quarkus/src/main/resources/application.properties index 6805a3565..3c7958245 100644 --- a/application/jaxrs-redis-quarkus/src/main/resources/application.properties +++ b/application/jaxrs-redis-quarkus/src/main/resources/application.properties @@ -13,8 +13,7 @@ quarkus.jaeger.service-name=jaxrs-redis-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 -%dev.quarkus.jaeger.agent-host-port=localhost:6831 -%test.quarkus.jaeger.agent-host-port=localhost:6831 +%test.quarkus.jaeger.enabled=false # message common.message=Hello k8s-3tier-webapp with quarkus diff --git a/application/parent-pom/pom.xml b/application/parent-pom/pom.xml index 253ad0a3e..66b4339f7 100644 --- a/application/parent-pom/pom.xml +++ b/application/parent-pom/pom.xml @@ -199,6 +199,7 @@ ${project.build.directory}/site/jacoco + diff --git a/application/producer-kafka-quarkus/src/main/resources/application.properties b/application/producer-kafka-quarkus/src/main/resources/application.properties index a3d0831f8..0f7f566bf 100644 --- a/application/producer-kafka-quarkus/src/main/resources/application.properties +++ b/application/producer-kafka-quarkus/src/main/resources/application.properties @@ -22,3 +22,10 @@ kafka.splitkey = , kafka.bootstrap.servers=kafka:9092 %test.kafka.bootstrap.servers=localhost:9092 mp.messaging.outgoing.message.connector=smallrye-kafka + +# Opentracing +quarkus.jaeger.service-name=producer-kafka-quarkus +quarkus.jaeger.sampler-type=const +quarkus.jaeger.sampler-param=1 +quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false diff --git a/application/randompublish-quarkus/src/main/resources/application.properties b/application/randompublish-quarkus/src/main/resources/application.properties index bfb2d6d07..17889a6f9 100644 --- a/application/randompublish-quarkus/src/main/resources/application.properties +++ b/application/randompublish-quarkus/src/main/resources/application.properties @@ -40,6 +40,7 @@ quarkus.jaeger.service-name=randompublish-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # log quarkus.log.console.enable=true diff --git a/application/scheduled-quarkus/src/main/java/webapp/tier/schedule/CallRandomPublshSchedule.java b/application/scheduled-quarkus/src/main/java/webapp/tier/schedule/CallRandomPublshSchedule.java index d1536822f..349b56eb7 100644 --- a/application/scheduled-quarkus/src/main/java/webapp/tier/schedule/CallRandomPublshSchedule.java +++ b/application/scheduled-quarkus/src/main/java/webapp/tier/schedule/CallRandomPublshSchedule.java @@ -1,5 +1,6 @@ package webapp.tier.schedule; +import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; @@ -46,11 +47,20 @@ void callRandomPublsh() { @Scheduled(every = "10m") void callDeleteDbs() { logger.log(Level.INFO, "Call: Delete Postgres"); - logger.log(Level.INFO, postgressvc.delete()); + String pstgresp = postgressvc.delete(); + if(!Objects.isNull(pstgresp)) { + logger.log(Level.INFO, pstgresp); + } logger.log(Level.INFO, "Call: Delete Mysql"); - logger.log(Level.INFO, mysqlsvc.delete()); + String mysqlresp = mysqlsvc.delete(); + if(!Objects.isNull(mysqlresp)) { + logger.log(Level.INFO, mysqlresp); + } logger.log(Level.INFO, "Call: Delete Mongodb"); - logger.log(Level.INFO, mongodbsvc.delete()); + String mongoresp = mongodbsvc.delete(); + if(!Objects.isNull(mongoresp)) { + logger.log(Level.INFO, mongoresp); + } } } diff --git a/application/scheduled-quarkus/src/main/resources/application.properties b/application/scheduled-quarkus/src/main/resources/application.properties index f83e31290..2713d14c3 100644 --- a/application/scheduled-quarkus/src/main/resources/application.properties +++ b/application/scheduled-quarkus/src/main/resources/application.properties @@ -17,6 +17,7 @@ quarkus.jaeger.service-name=scheduled-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 +%test.quarkus.jaeger.enabled=false # rest client random random/mp-rest/url=http://randompublish-quarkus:8080 diff --git a/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleTest.java b/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleTest.java index b10dc7f25..729509c0d 100644 --- a/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleTest.java +++ b/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleTest.java @@ -25,7 +25,7 @@ void testCallRandomPublsh() { } @Test - void testCallDeleteDbsError() { + void testCallDeleteDbs() { try { rps.callDeleteDbs(); } catch (Exception expected) { @@ -33,5 +33,4 @@ void testCallDeleteDbsError() { fail(); } } - } diff --git a/application/server-grpc-quarkus/src/main/resources/application.properties b/application/server-grpc-quarkus/src/main/resources/application.properties index df48b4aca..3599e310d 100644 --- a/application/server-grpc-quarkus/src/main/resources/application.properties +++ b/application/server-grpc-quarkus/src/main/resources/application.properties @@ -20,5 +20,4 @@ quarkus.jaeger.service-name=server-grpc-quarkus quarkus.jaeger.sampler-type=const quarkus.jaeger.sampler-param=1 quarkus.jaeger.agent-host-port=jaeger-agent:6831 -%dev.quarkus.jaeger.agent-host-port=localhost:6831 -%test.quarkus.jaeger.agent-host-port=localhost:6831 +%test.quarkus.jaeger.enabled=false diff --git a/application/webapp-service/src/test/java/webapp/tier/service/socket/ServiceSocketTest.java b/application/webapp-service/src/test/java/webapp/tier/service/socket/ServiceSocketTest.java index 2d519f75e..2be049e65 100644 --- a/application/webapp-service/src/test/java/webapp/tier/service/socket/ServiceSocketTest.java +++ b/application/webapp-service/src/test/java/webapp/tier/service/socket/ServiceSocketTest.java @@ -10,7 +10,6 @@ import javax.websocket.Session; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; import io.quarkus.test.junit.QuarkusTest;