summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2018-12-11 16:25:26 -0500
committersunil unnava <su622b@att.com>2018-12-11 21:37:38 +0000
commite157241cb7dfe023f57532f829e381644bdf18be (patch)
tree82116874a9ef0beac29bafe92866ffb82f5cbc60 /src/test/java/org/onap
parent83746dbc42bad55e52d4bed2617d0d0ca8634cb5 (diff)
add configurable default partitions and replicas1.1.15
Issue-ID: DMAAP-903 Change-Id: Iabb3da85c3e42ddf68d049e6a8164449f7be8296 Signed-off-by: sunil unnava <sunil.unnava@att.com>
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/service/impl/TopicServiceImplTest.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TopicServiceImplTest.java b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TopicServiceImplTest.java
index e5d3233..7cbdf79 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TopicServiceImplTest.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TopicServiceImplTest.java
@@ -141,6 +141,10 @@ public class TopicServiceImplTest {
when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "enforced.topic.name.AAF"))
.thenReturn("enfTopicName");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.partitions"))
+ .thenReturn("1");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.replicas"))
+ .thenReturn("1");
when(httpServReq.getHeader("AppName")).thenReturn("MyApp");
when(dmaapContext.getRequest()).thenReturn(httpServReq);
@@ -165,7 +169,11 @@ public class TopicServiceImplTest {
when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "enforced.topic.name.AAF"))
.thenReturn("enfTopicName");
-
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.partitions"))
+ .thenReturn("1");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.replicas"))
+ .thenReturn("1");
+
when(dmaapContext.getRequest()).thenReturn(httpServReq);
when(dmaapContext.getResponse()).thenReturn(httpServRes);
@@ -208,6 +216,10 @@ public class TopicServiceImplTest {
when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "enforced.topic.name.AAF"))
.thenReturn("enfTopicName");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.partitions"))
+ .thenReturn("1");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.replicas"))
+ .thenReturn("1");
when(httpServReq.getHeader("Authorization")).thenReturn(null);
when(dmaapContext.getRequest()).thenReturn(httpServReq);
@@ -232,6 +244,10 @@ public class TopicServiceImplTest {
when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "enforced.topic.name.AAF"))
.thenReturn("enfTopicName");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.partitions"))
+ .thenReturn("1");
+ when(PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop, "default.replicas"))
+ .thenReturn("1");
when(httpServReq.getHeader("Authorization")).thenReturn("Authorization");
when(dmaapContext.getRequest()).thenReturn(httpServReq);