Commit d71c579e authored by Nikhil Singh[MicroSoft]'s avatar Nikhil Singh[MicroSoft]
Browse files

Update tests

parent a34b4683
Pipeline #65108 failed with stages
in 2 minutes and 7 seconds
......@@ -81,8 +81,8 @@ public class MessageBusImplTest {
@Before
public void init() throws ServiceBusException, InterruptedException {
initMocks(this);
when(this.eventGridConfig.getCustomTopicName()).thenReturn(TOPIC_NAME);
when(this.serviceBusConfig.getCustomTopicName()).thenReturn(TOPIC_NAME);
when(this.eventGridConfig.getEventGridCustomTopic()).thenReturn(TOPIC_NAME);
when(this.serviceBusConfig.getServiceBusCustomTopic()).thenReturn(TOPIC_NAME);
doReturn(DATA_PARTITION_WITH_FALLBACK_ACCOUNT_ID).when(dpsHeaders).getPartitionIdWithFallbackToAccountId();
doReturn(PARTITION_ID).when(dpsHeaders).getPartitionId();
doReturn(CORRELATION_ID).when(dpsHeaders).getCorrelationId();
......@@ -117,7 +117,8 @@ public class MessageBusImplTest {
//The schema-notification is turned off
when(this.eventGridConfig.isEventGridEnabled()).thenReturn(true);
//The schema-notification is turned off
when(this.eventGridConfig.getCustomTopicName()).thenReturn("dummy-topic");
when(this.eventGridConfig.getEventGridCustomTopic()).thenReturn(TOPIC_NAME);
when(this.serviceBusConfig.getServiceBusCustomTopic()).thenReturn(TOPIC_NAME);
doNothing().when(messagePublisher).publishMessage(any(), any());
//Call publish Message
messageBusImpl.publishMessage("dummy", "dummy");
......@@ -140,7 +141,8 @@ public class MessageBusImplTest {
//The schema-notification is turned on
when(this.eventGridConfig.isEventGridEnabled()).thenReturn(true);
when(this.eventGridConfig.getCustomTopicName()).thenReturn("dummy-topic");
when(this.eventGridConfig.getEventGridCustomTopic()).thenReturn(TOPIC_NAME);
when(this.serviceBusConfig.getServiceBusCustomTopic()).thenReturn(TOPIC_NAME);
//Call publish Message
messageBusImpl.publishMessageForSystemSchema("dummy", "schema_create");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment