Browse Source

fixed unit tests

pull/9437/head
dashevchenko 3 years ago
parent
commit
dd53193371
  1. 2
      application/src/test/java/org/thingsboard/server/queue/discovery/HashPartitionServiceTest.java
  2. 2
      common/queue/src/main/java/org/thingsboard/server/queue/discovery/TopicService.java

2
application/src/test/java/org/thingsboard/server/queue/discovery/HashPartitionServiceTest.java

@ -62,6 +62,7 @@ import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@ -88,6 +89,7 @@ public class HashPartitionServiceTest {
routingInfoService = mock(TenantRoutingInfoService.class);
queueRoutingInfoService = mock(QueueRoutingInfoService.class);
topicService = mock(TopicService.class);
when(topicService.buildTopicName(Mockito.any())).thenAnswer(i -> i.getArguments()[0]);
clusterRoutingService = createPartitionService();
ServiceInfo currentServer = ServiceInfo.newBuilder()
.setServiceId("tb-core-0")

2
common/queue/src/main/java/org/thingsboard/server/queue/discovery/TopicService.java

@ -15,7 +15,6 @@
*/
package org.thingsboard.server.queue.discovery;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.thingsboard.server.common.data.id.TenantId;
@ -28,7 +27,6 @@ import java.util.Map;
@Service
public class TopicService {
@Getter
@Value("${queue.prefix}")
private String prefix;

Loading…
Cancel
Save