From a686fd2471564aec756e45cd6513888b2fa4d65c Mon Sep 17 00:00:00 2001 From: yurak Date: Thu, 16 Feb 2023 00:36:49 +0900 Subject: [PATCH 01/15] fix Anonymous classes should not contain unused non-overridden methods #3049 --- .../tier/healthcheck/ReadinessHealthCheckHazelcastTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From b44aa7e6be85332d4c1ec517885628ecb0feb88f Mon Sep 17 00:00:00 2001 From: yurak Date: Thu, 16 Feb 2023 00:41:04 +0900 Subject: [PATCH 02/15] delete Unused import - org.mockito.Mockito. #3049 --- .../test/java/webapp/tier/service/socket/ActiveMqSocketTest.java | 1 - .../java/webapp/tier/service/socket/HazelcastSocketTest.java | 1 - .../src/test/java/webapp/tier/service/MemcachedServiceTest.java | 1 - .../test/java/webapp/tier/service/socket/RabbitmqSocketTest.java | 1 - .../test/java/webapp/tier/service/socket/ServiceSocketTest.java | 1 - 5 files changed, 5 deletions(-) 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-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-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-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/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; From 1f4b2ed804e2ab8de339318398da5d34cb40f298 Mon Sep 17 00:00:00 2001 From: yurak Date: Thu, 16 Feb 2023 18:47:06 +0900 Subject: [PATCH 03/15] Invoke method(s) only conditionally by sonarcloud #3049 --- .../tier/schedule/CallRandomPublshSchedule.java | 16 +++++++++++++--- .../schedule/CallRandomPublshScheduleTest.java | 3 +-- 2 files changed, 14 insertions(+), 5 deletions(-) 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/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(); } } - } From 7d30b81006d72a266726682101b1ed65e9ddde2f Mon Sep 17 00:00:00 2001 From: yurak Date: Thu, 16 Feb 2023 18:53:46 +0900 Subject: [PATCH 04/15] add %test.quarkus.jaeger.enabled=false #3049 --- .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 2 +- .../src/main/resources/application.properties | 3 +-- .../src/main/resources/application.properties | 2 +- .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 3 +-- .../src/main/resources/application.properties | 3 +-- .../src/main/resources/application.properties | 7 +++++++ .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 3 +-- 21 files changed, 27 insertions(+), 10 deletions(-) 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-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-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-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/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/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-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/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/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 From 31bec5d7d5096ea8d35e7de01569887bba09a52a Mon Sep 17 00:00:00 2001 From: yurak Date: Thu, 16 Feb 2023 18:54:04 +0900 Subject: [PATCH 05/15] add %test.quarkus.jaeger.enabled=false #3049 --- .../scheduled-quarkus/src/main/resources/application.properties | 1 + 1 file changed, 1 insertion(+) 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 From cb43a8b1e695ef39bc856227ff51f0c94341bf83 Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 8 Mar 2023 23:44:52 +0900 Subject: [PATCH 06/15] change alert level for snyk container #3020 --- .github/workflows/docker-image-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-image-ci.yml b/.github/workflows/docker-image-ci.yml index 8452f000b..742d7180a 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 From 58b1fd1ee68bcb5c9898217ead77ce3b063e536b Mon Sep 17 00:00:00 2001 From: yurak Date: Fri, 10 Mar 2023 12:42:37 +0900 Subject: [PATCH 07/15] comment out jacoco-check coverage --- application/parent-pom/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/parent-pom/pom.xml b/application/parent-pom/pom.xml index 2971b0841..07249abfe 100644 --- a/application/parent-pom/pom.xml +++ b/application/parent-pom/pom.xml @@ -199,6 +199,7 @@ ${project.build.directory}/site/jacoco + From 3aec47e6f229711e2cc331a4dd88466ce0542759 Mon Sep 17 00:00:00 2001 From: yurak Date: Fri, 10 Mar 2023 12:52:07 +0900 Subject: [PATCH 08/15] add QuarkusIntegrationTest cases --- .../src/test/java/webapp/tier/service/RandomServiceIT.java | 7 +++++++ .../webapp/tier/schedule/CallRandomPublshScheduleIT.java | 7 +++++++ .../src/test/java/webapp/tier/grpc/IdServiceIT.java | 7 +++++++ .../src/test/java/webapp/tier/grpc/MsgServiceIT.java | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java create mode 100644 application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java create mode 100644 application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java create mode 100644 application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java diff --git a/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java b/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java new file mode 100644 index 000000000..857588169 --- /dev/null +++ b/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java @@ -0,0 +1,7 @@ +package webapp.tier.service; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class RandomServiceIT extends RandomServiceTest { +} diff --git a/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java b/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java new file mode 100644 index 000000000..9521afc1d --- /dev/null +++ b/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java @@ -0,0 +1,7 @@ +package webapp.tier.schedule; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class CallRandomPublshScheduleIT extends CallRandomPublshScheduleTest { +} diff --git a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java new file mode 100644 index 000000000..8c54cb5c1 --- /dev/null +++ b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java @@ -0,0 +1,7 @@ +package webapp.tier.grpc; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class IdServiceIT extends IdServiceTest { +} diff --git a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java new file mode 100644 index 000000000..1268c6b83 --- /dev/null +++ b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java @@ -0,0 +1,7 @@ +package webapp.tier.grpc; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +class MsgServiceIT extends MsgServiceTest { +} From 1caf800be6a8fb918d918dfc001ab6d843f25850 Mon Sep 17 00:00:00 2001 From: yurak Date: Fri, 10 Mar 2023 14:55:04 +0900 Subject: [PATCH 09/15] Revert "add QuarkusIntegrationTest cases" This reverts commit 3aec47e6f229711e2cc331a4dd88466ce0542759. --- .../src/test/java/webapp/tier/service/RandomServiceIT.java | 7 ------- .../webapp/tier/schedule/CallRandomPublshScheduleIT.java | 7 ------- .../src/test/java/webapp/tier/grpc/IdServiceIT.java | 7 ------- .../src/test/java/webapp/tier/grpc/MsgServiceIT.java | 7 ------- 4 files changed, 28 deletions(-) delete mode 100644 application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java delete mode 100644 application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java delete mode 100644 application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java delete mode 100644 application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java diff --git a/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java b/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java deleted file mode 100644 index 857588169..000000000 --- a/application/randompublish-quarkus/src/test/java/webapp/tier/service/RandomServiceIT.java +++ /dev/null @@ -1,7 +0,0 @@ -package webapp.tier.service; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -class RandomServiceIT extends RandomServiceTest { -} diff --git a/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java b/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java deleted file mode 100644 index 9521afc1d..000000000 --- a/application/scheduled-quarkus/src/test/java/webapp/tier/schedule/CallRandomPublshScheduleIT.java +++ /dev/null @@ -1,7 +0,0 @@ -package webapp.tier.schedule; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -class CallRandomPublshScheduleIT extends CallRandomPublshScheduleTest { -} diff --git a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java deleted file mode 100644 index 8c54cb5c1..000000000 --- a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/IdServiceIT.java +++ /dev/null @@ -1,7 +0,0 @@ -package webapp.tier.grpc; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -class IdServiceIT extends IdServiceTest { -} diff --git a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java b/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java deleted file mode 100644 index 1268c6b83..000000000 --- a/application/server-grpc-quarkus/src/test/java/webapp/tier/grpc/MsgServiceIT.java +++ /dev/null @@ -1,7 +0,0 @@ -package webapp.tier.grpc; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -class MsgServiceIT extends MsgServiceTest { -} From f1d9dbaa1c0b366bc4f93fdec9491a75bf7b005d Mon Sep 17 00:00:00 2001 From: yurak Date: Tue, 4 Apr 2023 17:52:18 +0900 Subject: [PATCH 10/15] doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' --- ...aSubscribeServiceIT.java => KafkaSubscribeServiceITest.java} | 2 +- ...ketTestForQuarkus.java => ActiveMqSocketForQuarkusTest.java} | 2 +- .../resource/{GrpcResourceIT.java => GrpcResourceITest.java} | 2 +- ...etTestForQuarkus.java => HazelcastSocketForQuarkusTest.java} | 2 +- ...ketTestForQuarkus.java => RabbitmqSocketForQuarkusTest.java} | 2 +- .../{RandomResourceIT.java => RandomResourceITest.java} | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/{KafkaSubscribeServiceIT.java => KafkaSubscribeServiceITest.java} (96%) rename application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/{ActiveMqSocketTestForQuarkus.java => ActiveMqSocketForQuarkusTest.java} (97%) rename application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/{GrpcResourceIT.java => GrpcResourceITest.java} (97%) rename application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/{HazelcastSocketTestForQuarkus.java => HazelcastSocketForQuarkusTest.java} (97%) rename application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/{RabbitmqSocketTestForQuarkus.java => RabbitmqSocketForQuarkusTest.java} (97%) rename application/randompublish-quarkus/src/test/java/webapp/tier/resource/{RandomResourceIT.java => RandomResourceITest.java} (91%) diff --git a/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java b/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java similarity index 96% rename from application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java rename to application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java index 5506e20c6..8a136f5c4 100644 --- a/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java +++ b/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java @@ -12,7 +12,7 @@ import io.smallrye.reactive.messaging.kafka.companion.ProducerTask; @QuarkusIntegrationTest -class KafkaSubscribeServiceIT { +class KafkaSubscribeServiceITest { @InjectKafkaCompanion KafkaCompanion companion; 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 97% 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..2710f28cf 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class ActiveMqSocketTestForQuarkus { +class ActiveMqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); diff --git a/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java b/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java similarity index 97% rename from application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java rename to application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java index 206d79691..e4ae3e7e8 100644 --- a/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java +++ b/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java @@ -13,7 +13,7 @@ import io.quarkus.test.junit.QuarkusIntegrationTest; @QuarkusIntegrationTest -class GrpcResourceIT { +class GrpcResourceITest { private ManagedChannel channel; 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 97% 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..e586cc1a7 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class HazelcastSocketTestForQuarkus { +class HazelcastSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); 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 97% 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..b6bb7820d 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class RabbitmqSocketTestForQuarkus { +class RabbitmqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); diff --git a/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java b/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java similarity index 91% rename from application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java rename to application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java index 0ad75f60c..8e479092e 100644 --- a/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java +++ b/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java @@ -7,7 +7,7 @@ import io.quarkus.test.junit.QuarkusIntegrationTest; @QuarkusIntegrationTest -class RandomResourceIT { +class RandomResourceITest { @Test void testrandom() throws Exception { From bce0bd65e9efd7e7896a6886f01ea7b04636bedf Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 5 Apr 2023 14:40:32 +0900 Subject: [PATCH 11/15] Revert "doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$'" This reverts commit f1d9dbaa1c0b366bc4f93fdec9491a75bf7b005d. --- ...aSubscribeServiceITest.java => KafkaSubscribeServiceIT.java} | 2 +- ...ketForQuarkusTest.java => ActiveMqSocketTestForQuarkus.java} | 2 +- .../resource/{GrpcResourceITest.java => GrpcResourceIT.java} | 2 +- ...etForQuarkusTest.java => HazelcastSocketTestForQuarkus.java} | 2 +- ...ketForQuarkusTest.java => RabbitmqSocketTestForQuarkus.java} | 2 +- .../{RandomResourceITest.java => RandomResourceIT.java} | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/{KafkaSubscribeServiceITest.java => KafkaSubscribeServiceIT.java} (96%) rename application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/{ActiveMqSocketForQuarkusTest.java => ActiveMqSocketTestForQuarkus.java} (97%) rename application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/{GrpcResourceITest.java => GrpcResourceIT.java} (97%) rename application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/{HazelcastSocketForQuarkusTest.java => HazelcastSocketTestForQuarkus.java} (97%) rename application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/{RabbitmqSocketForQuarkusTest.java => RabbitmqSocketTestForQuarkus.java} (97%) rename application/randompublish-quarkus/src/test/java/webapp/tier/resource/{RandomResourceITest.java => RandomResourceIT.java} (91%) diff --git a/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java b/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java similarity index 96% rename from application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java rename to application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java index 8a136f5c4..5506e20c6 100644 --- a/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceITest.java +++ b/application/consumer-kafka-quarkus/src/test/java/webapp/tier/service/KafkaSubscribeServiceIT.java @@ -12,7 +12,7 @@ import io.smallrye.reactive.messaging.kafka.companion.ProducerTask; @QuarkusIntegrationTest -class KafkaSubscribeServiceITest { +class KafkaSubscribeServiceIT { @InjectKafkaCompanion KafkaCompanion companion; diff --git a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java similarity index 97% rename from application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java rename to application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java index 2710f28cf..1b2769320 100644 --- a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java +++ b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketTestForQuarkus.java @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class ActiveMqSocketForQuarkusTest { +class ActiveMqSocketTestForQuarkus { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); diff --git a/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java b/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java similarity index 97% rename from application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java rename to application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java index e4ae3e7e8..206d79691 100644 --- a/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceITest.java +++ b/application/jaxrs-grpc-quarkus/src/test/java/webapp/tier/resource/GrpcResourceIT.java @@ -13,7 +13,7 @@ import io.quarkus.test.junit.QuarkusIntegrationTest; @QuarkusIntegrationTest -class GrpcResourceITest { +class GrpcResourceIT { private ManagedChannel channel; diff --git a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java similarity index 97% rename from application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java rename to application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java index e586cc1a7..a0687aa21 100644 --- a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java +++ b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketTestForQuarkus.java @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class HazelcastSocketForQuarkusTest { +class HazelcastSocketTestForQuarkus { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); diff --git a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java similarity index 97% rename from application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java rename to application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java index b6bb7820d..efd14c583 100644 --- a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java +++ b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketTestForQuarkus.java @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class RabbitmqSocketForQuarkusTest { +class RabbitmqSocketTestForQuarkus { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); diff --git a/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java b/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java similarity index 91% rename from application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java rename to application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java index 8e479092e..0ad75f60c 100644 --- a/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceITest.java +++ b/application/randompublish-quarkus/src/test/java/webapp/tier/resource/RandomResourceIT.java @@ -7,7 +7,7 @@ import io.quarkus.test.junit.QuarkusIntegrationTest; @QuarkusIntegrationTest -class RandomResourceITest { +class RandomResourceIT { @Test void testrandom() throws Exception { From 5bb6de9a7ea1c97fb88532e1c0008bd24b0821b4 Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 5 Apr 2023 14:43:57 +0900 Subject: [PATCH 12/15] doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$' --- ...ketTestForQuarkus.java => ActiveMqSocketForQuarkusTest.java} | 2 +- ...etTestForQuarkus.java => HazelcastSocketForQuarkusTest.java} | 2 +- ...ketTestForQuarkus.java => RabbitmqSocketForQuarkusTest.java} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/{ActiveMqSocketTestForQuarkus.java => ActiveMqSocketForQuarkusTest.java} (97%) rename application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/{HazelcastSocketTestForQuarkus.java => HazelcastSocketForQuarkusTest.java} (97%) rename application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/{RabbitmqSocketTestForQuarkus.java => RabbitmqSocketForQuarkusTest.java} (97%) 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 97% 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..2710f28cf 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class ActiveMqSocketTestForQuarkus { +class ActiveMqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); 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 97% 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..e586cc1a7 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class HazelcastSocketTestForQuarkus { +class HazelcastSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); 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 97% 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..b6bb7820d 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 @@ -21,7 +21,7 @@ import io.quarkus.test.junit.QuarkusTest; @QuarkusTest -class RabbitmqSocketTestForQuarkus { +class RabbitmqSocketForQuarkusTest { private static final LinkedBlockingDeque MESSAGES = new LinkedBlockingDeque<>(); From 5097f3d2f23bb1b0f66c0c60ab289d955281fc65 Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 5 Apr 2023 14:55:13 +0900 Subject: [PATCH 13/15] fix PMD MissingOverride (Priority: 3):The method 'run()' is missing an @Override annotation. --- .../main/java/webapp/tier/service/ActiveMqSubscribeService.java | 1 + 1 file changed, 1 insertion(+) 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 From 196ad9ba45c4d452dbbb7beea50dff46a1cf881b Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 5 Apr 2023 15:01:33 +0900 Subject: [PATCH 14/15] fix PMD Avoid unused local variables such as 'con'. --- .../src/main/java/webapp/tier/service/MysqlService.java | 3 ++- .../src/main/java/webapp/tier/service/PostgresService.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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-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); From f1cc14242d3004ca30832885c0d4e1998ee16d01 Mon Sep 17 00:00:00 2001 From: yurak Date: Wed, 5 Apr 2023 15:04:10 +0900 Subject: [PATCH 15/15] fix deepsource JUnit5 test classes and methods should be package-private --- .../tier/service/socket/ActiveMqSocketForQuarkusTest.java | 6 +++--- .../tier/service/socket/HazelcastSocketForQuarkusTest.java | 6 +++--- .../tier/service/socket/RabbitmqSocketForQuarkusTest.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java b/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.java index 2710f28cf..024339b91 100644 --- a/application/jaxrs-activemq-quarkus/src/test/java/webapp/tier/service/socket/ActiveMqSocketForQuarkusTest.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; @@ -29,7 +29,7 @@ class ActiveMqSocketForQuarkusTest { 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-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java b/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.java index e586cc1a7..7f39af5d2 100644 --- a/application/jaxrs-hazelcast-quarkus/src/test/java/webapp/tier/service/socket/HazelcastSocketForQuarkusTest.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; @@ -29,7 +29,7 @@ class HazelcastSocketForQuarkusTest { 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/RabbitmqSocketForQuarkusTest.java b/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.java index b6bb7820d..dda7a0cc3 100644 --- a/application/jaxrs-rabbitmq-quarkus/src/test/java/webapp/tier/service/socket/RabbitmqSocketForQuarkusTest.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; @@ -29,7 +29,7 @@ class RabbitmqSocketForQuarkusTest { 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"));