Fix TopicPartitionInfoTest
This commit is contained in:
parent
92466630b1
commit
6678ec2e06
@ -18,12 +18,16 @@ package org.thingsboard.server.common.msg.queue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
public class TopicPartitionInfoTest {
|
||||
|
||||
private final TenantId tenantId = TenantId.fromUUID(UUID.randomUUID());
|
||||
|
||||
@Test
|
||||
public void givenTopicPartitionInfo_whenEquals_thenTrue() {
|
||||
|
||||
@ -52,13 +56,13 @@ public class TopicPartitionInfoTest {
|
||||
|
||||
assertThat(TopicPartitionInfo.builder()
|
||||
.topic("tb_core")
|
||||
.tenantId(TenantId.SYS_TENANT_ID)
|
||||
.tenantId(tenantId)
|
||||
.partition(4)
|
||||
.myPartition(true) //will ignored on equals
|
||||
.build()
|
||||
, is(TopicPartitionInfo.builder()
|
||||
.topic("tb_core")
|
||||
.tenantId(TenantId.SYS_TENANT_ID)
|
||||
.tenantId(tenantId)
|
||||
.partition(4)
|
||||
.myPartition(true) //will ignored on equals
|
||||
.build()));
|
||||
@ -109,7 +113,7 @@ public class TopicPartitionInfoTest {
|
||||
|
||||
assertThat(TopicPartitionInfo.builder()
|
||||
.topic("tb_core")
|
||||
.tenantId(TenantId.SYS_TENANT_ID)
|
||||
.tenantId(tenantId)
|
||||
.partition(4)
|
||||
.myPartition(true) //will ignored on equals
|
||||
.build()
|
||||
@ -117,7 +121,7 @@ public class TopicPartitionInfoTest {
|
||||
|
||||
assertThat(TopicPartitionInfo.builder()
|
||||
.topic("tb_core")
|
||||
.tenantId(TenantId.SYS_TENANT_ID)
|
||||
.tenantId(tenantId)
|
||||
.partition(4)
|
||||
.myPartition(false) //will ignored on equals
|
||||
.build()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user