From 748fd66712f64f13927eeb6fc4e0a94de98d3498 Mon Sep 17 00:00:00 2001 From: abotev-intracol Date: Mon, 1 Oct 2018 19:29:45 +0300 Subject: [PATCH] NY-3270 GRPC unit test engine refactoring - add grpc port in all test classes; Signed-off-by: abotev-intracol --- src/main/resources/application-dev.yml | 5 ++++- src/main/resources/application-production.yml | 3 +++ .../java/biz/nynja/account/services/AccountServiceTests.java | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 9019371..83c05a1 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 99d0ae7..4d7051c 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 60eab8d..ab73bdc 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") -- GitLab