diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 90193710d89ee2cb2f89dbe536e762e8d7b1c776..83c05a166aa6e841497750795f8130382a7700de 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -2,7 +2,10 @@ grpc: enabled: true enableReflection: false port: 6565 - + unitTest: + port: + accountServiceTest: 11001 + spring: data: cassandra: diff --git a/src/main/resources/application-production.yml b/src/main/resources/application-production.yml index 99d0ae7ce5819376c65512793889dd415eaca1b6..4d7051cad6dc00478043b482af086b27d54f826b 100644 --- a/src/main/resources/application-production.yml +++ b/src/main/resources/application-production.yml @@ -2,6 +2,9 @@ grpc: enabled: ${GRPC_ENABLED:true} enableReflection: ${GRPC_ENABLE_REFLECTION:false} port: ${GRPC_SERVER_PORT:6565} + unitTest: + port: + accountServiceTest: 11001 spring: data: diff --git a/src/test/java/biz/nynja/account/services/AccountServiceTests.java b/src/test/java/biz/nynja/account/services/AccountServiceTests.java index 60eab8d4c0237c338ef21d3b0a9fda36d032f85a..ab73bdcffd811fae17087c634b7496dfe5377b65 100644 --- a/src/test/java/biz/nynja/account/services/AccountServiceTests.java +++ b/src/test/java/biz/nynja/account/services/AccountServiceTests.java @@ -76,6 +76,7 @@ import biz.nynja.account.utils.Util; @SpringBootTest(classes = { Util.class, CassandraTestsConfig.class }, webEnvironment = WebEnvironment.RANDOM_PORT, properties = { + "grpc.port=${grpc.unitTest.port.accountServiceTest}", "spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration", "spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration" }) @ActiveProfiles("dev")