mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 19:38:20 +08:00
真实环境配置定义在配置文件中
This commit is contained in:
@@ -18,6 +18,7 @@ import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -32,7 +33,8 @@ import java.util.List;
|
||||
*/
|
||||
public class OrderServiceTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final Integer INVALID_ORDER_TYPE = -1;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -32,7 +33,8 @@ public class ApplyAppOrderTest extends BaseTest {
|
||||
|
||||
private static final Long ORDER_ID = 1L;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final Integer APPLY_TOPIC_TYPE = 0;
|
||||
|
||||
@@ -41,7 +43,8 @@ public class ApplyAppOrderTest extends BaseTest {
|
||||
*/
|
||||
private static final Integer ORDER_PASSED_STATUS = 1;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applyAppOrder")
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -38,15 +39,18 @@ public class ApplyAuthorityOrderTest extends BaseTest {
|
||||
|
||||
private final static String TOPIC_NOT_EXIST_EXTENSIONS = "{\"clusterId\":7,\"topicName\":\"xxxx\",\"appId\":\"dkm_admin\",\"access\":\"3\"}";
|
||||
|
||||
private final static Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
private static final Long ORDER_ID = 1L;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final Integer APPLY_TOPIC_TYPE = 0;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
private static final String INVALIDE_USER = "xxxx";
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@@ -25,7 +26,8 @@ import org.testng.annotations.Test;
|
||||
*/
|
||||
public class ApplyClusterOrderTest extends BaseTest {
|
||||
|
||||
private final static String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
private final static String IDC = "国内";
|
||||
|
||||
@@ -33,7 +35,8 @@ public class ApplyClusterOrderTest extends BaseTest {
|
||||
|
||||
private final static String INVALID_IDC = "xxx";
|
||||
|
||||
private final static String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("applyClusterOrder")
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -38,14 +39,16 @@ public class ApplyPartitionOrderTest extends BaseTest {
|
||||
|
||||
private static final String INVALIDE_APPROVE_ORDER_APPLY_DETAIL = "{\"brokerIdList\":[3],\"partitionNum\":0,\"regionId\":1}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
*/
|
||||
private static final Integer ORDER_PASSED_STATUS = 1;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -37,7 +38,8 @@ import java.util.Date;
|
||||
*/
|
||||
public class ApplyQuotaOrderTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -55,7 +57,8 @@ public class ApplyQuotaOrderTest extends BaseTest {
|
||||
|
||||
private static final String APPROVE_ORDER_APPLY_DETAIL = "{\"brokerIdList\":[3],\"partitionNum\":1,\"regionId\":1}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -34,7 +35,8 @@ import java.util.Date;
|
||||
* @Date 2021/12/27
|
||||
*/
|
||||
public class ApplyTopicOrderTest extends BaseTest {
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -52,7 +54,8 @@ public class ApplyTopicOrderTest extends BaseTest {
|
||||
|
||||
private static final String APPROVE_ORDER_APPLY_DETAIL = "{\"brokerIdList\":[3],\"partitionNum\":1,\"replicaNum\":1,\"retentionTime\":12}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -35,7 +36,8 @@ public class DeleteAppOrderTest extends BaseTest {
|
||||
|
||||
private static final Long ORDER_ID = 1L;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final Integer APPLY_TOPIC_TYPE = 0;
|
||||
|
||||
@@ -43,9 +45,6 @@ public class DeleteAppOrderTest extends BaseTest {
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
*/
|
||||
private static final Integer ORDER_PASSED_STATUS = 1;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
|
||||
@Autowired
|
||||
@Qualifier("deleteAppOrder")
|
||||
@InjectMocks
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@@ -32,15 +33,18 @@ public class DeleteAuthorityOrderTest extends BaseTest {
|
||||
|
||||
private final static String EXTENSIONS = "{\"clusterId\":7,\"topicName\":\"moduleTest\",\"appId\":\"dkm_admin\",\"access\":\"3\"}";
|
||||
|
||||
@Value("${test.phyCluster.id}")
|
||||
private final static Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
|
||||
private static final Long ORDER_ID = 1L;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final Integer APPLY_TOPIC_TYPE = 0;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
private static final String INVALIDE_USER = "xxxx";
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -30,7 +31,8 @@ import java.util.Set;
|
||||
*/
|
||||
public class DeleteClusterOrderTest extends BaseTest {
|
||||
|
||||
private final static String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
private final static String IDC = "国内";
|
||||
|
||||
@@ -38,7 +40,8 @@ public class DeleteClusterOrderTest extends BaseTest {
|
||||
|
||||
private final static String INVALID_IDC = "xxx";
|
||||
|
||||
private final static String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private final static Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -35,7 +36,8 @@ import java.util.Date;
|
||||
*/
|
||||
public class DeleteTopicOrderTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -53,11 +55,13 @@ public class DeleteTopicOrderTest extends BaseTest {
|
||||
|
||||
private static final String APPROVE_ORDER_APPLY_DETAIL = "{\"brokerIdList\":[3],\"partitionNum\":1,\"replicaNum\":1,\"retentionTime\":12}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
private static final Long INVALID_CLUSTER_ID = -1L;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@@ -25,7 +26,8 @@ import org.testng.annotations.Test;
|
||||
*/
|
||||
public class ModifyClusterOrderTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -39,7 +41,8 @@ public class ModifyClusterOrderTest extends BaseTest {
|
||||
|
||||
private static final String EXTENSIONS = "{\"clusterId\":7}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("modifyClusterOrder")
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -23,8 +24,8 @@ import org.testng.annotations.Test;
|
||||
* @Date 2021/12/31
|
||||
*/
|
||||
public class ModifyGatewayConfigOrderTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -48,7 +49,8 @@ public class ModifyGatewayConfigOrderTest extends BaseTest {
|
||||
|
||||
private static final Long INVALID_CLUSTER_ID = -1L;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -34,8 +35,8 @@ import java.util.Date;
|
||||
* @Date 2021/12/31
|
||||
*/
|
||||
public class ThirdPartDeleteTopicOrderTest extends BaseTest {
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String INVALID_USER_NAME = "xxxxx";
|
||||
|
||||
@@ -53,11 +54,13 @@ public class ThirdPartDeleteTopicOrderTest extends BaseTest {
|
||||
|
||||
private static final String APPROVE_ORDER_APPLY_DETAIL = "{\"brokerIdList\":[3],\"partitionNum\":1,\"replicaNum\":1,\"retentionTime\":12}";
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
private static final Long INVALID_CLUSTER_ID = -1L;
|
||||
|
||||
private static final String APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String APP_ID;
|
||||
|
||||
/**
|
||||
* 工单状态, 0:待审批, 1:通过, 2:拒绝, 3:取消
|
||||
|
||||
@@ -96,3 +96,32 @@ notify:
|
||||
topic-name: didi-kafka-notify
|
||||
order:
|
||||
detail-url: http://127.0.0.1
|
||||
|
||||
test:
|
||||
topic:
|
||||
name1: moduleTest
|
||||
name2: xgTest
|
||||
name3: expandPartitionTopic
|
||||
name4: topic_a
|
||||
name5: NoOffsetChangeTopic
|
||||
name6: _consumer_offsets
|
||||
phyCluster:
|
||||
id: 1
|
||||
name: LogiKM_moduleTest
|
||||
logicalCluster:
|
||||
name: logical_cluster_1
|
||||
broker:
|
||||
id1: 1
|
||||
id2: 2
|
||||
id3: 3
|
||||
app:
|
||||
id: dkm_admin
|
||||
ZK:
|
||||
address: 10.190.12.242:2181,10.190.25.160:2181,10.190.25.41:2181/wyc
|
||||
bootstrap-servers: 10.190.12.242:9093,10.190.25.160:9093,10.190.25.41:9093
|
||||
gateway: 172.23.161.128
|
||||
sasl-plaintext: SASL_PLAINTEXT://10.179.162.202:9093
|
||||
admin: admin
|
||||
consumer-group: moduleTestGroup
|
||||
client-id: dkm_admin.moduleTest
|
||||
region-name: region_1
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -30,9 +31,11 @@ import java.util.Arrays;
|
||||
*/
|
||||
public class ClusterTaskServiceTest extends BaseTest {
|
||||
|
||||
private static final Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
private static final String ADMIN = "admin";
|
||||
@Value("${test.admin}")
|
||||
private String ADMIN;
|
||||
|
||||
private static final String BASEURL = "127.0.0.1";
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -28,6 +29,7 @@ public class KafkaFileServiceTest extends BaseTest {
|
||||
|
||||
private static final Long KAFKA_FILE_ID = 1L;
|
||||
|
||||
@Value("${test.admin}")
|
||||
private static final String ADMIN = "admin";
|
||||
|
||||
private KafkaFileDTO getKafkaFileDTO() {
|
||||
|
||||
@@ -96,3 +96,32 @@ notify:
|
||||
topic-name: didi-kafka-notify
|
||||
order:
|
||||
detail-url: http://127.0.0.1
|
||||
|
||||
test:
|
||||
topic:
|
||||
name1: moduleTest
|
||||
name2: xgTest
|
||||
name3: expandPartitionTopic
|
||||
name4: topic_a
|
||||
name5: NoOffsetChangeTopic
|
||||
name6: _consumer_offsets
|
||||
phyCluster:
|
||||
id: 1
|
||||
name: LogiKM_moduleTest
|
||||
logicalCluster:
|
||||
name: logical_cluster_1
|
||||
broker:
|
||||
id1: 1
|
||||
id2: 2
|
||||
id3: 3
|
||||
app:
|
||||
id: dkm_admin
|
||||
ZK:
|
||||
address: 10.190.12.242:2181,10.190.25.160:2181,10.190.25.41:2181/wyc
|
||||
bootstrap-servers: 10.190.12.242:9093,10.190.25.160:9093,10.190.25.41:9093
|
||||
gateway: 172.23.161.128
|
||||
sasl-plaintext: SASL_PLAINTEXT://10.179.162.202:9093
|
||||
admin: admin
|
||||
consumer-group: moduleTestGroup
|
||||
client-id: dkm_admin.moduleTest
|
||||
region-name: region_1
|
||||
@@ -13,6 +13,7 @@ import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -28,25 +29,32 @@ import java.util.List;
|
||||
*/
|
||||
public class ThirdPartServiceTest extends BaseTest {
|
||||
|
||||
private final static Long REAL_CLUSTER_ID_IN_MYSQL = 1L;
|
||||
@Value("${test.phyCluster.id}")
|
||||
private Long REAL_CLUSTER_ID_IN_MYSQL;
|
||||
|
||||
private final static String REAL_TOPIC_IN_ZK = "moduleTest";
|
||||
@Value("${test.topic.name1}")
|
||||
private String REAL_TOPIC_IN_ZK;
|
||||
|
||||
private final static String REAL_PHYSICAL_CLUSTER_NAME = "LogiKM_moduleTest";
|
||||
@Value("${test.phyCluster.name}")
|
||||
private String REAL_PHYSICAL_CLUSTER_NAME;
|
||||
|
||||
private final static String ZOOKEEPER = "10.190.12.242:2181,10.190.25.160:2181,10.190.25.41:2181/wyc";
|
||||
@Value("${test.ZK.address}")
|
||||
private String ZOOKEEPER;
|
||||
|
||||
private final static String BOOTSTRAP_SERVERS = "10.190.12.242:9093,10.190.25.160:9093,10.190.25.41:9093";
|
||||
@Value("${test.ZK.bootstrap-servers}")
|
||||
private String BOOTSTRAP_SERVERS;
|
||||
|
||||
private final static String SECURITY_PROPERTIES = "{ \t\"security.protocol\": \"SASL_PLAINTEXT\", \t\"sasl.mechanism\": \"PLAIN\", \t\"sasl.jaas.config\": \"org.apache.kafka.common.security.plain.PlainLoginModule required username=\\\"dkm_admin\\\" password=\\\"km_kMl4N8as1Kp0CCY\\\";\" }";
|
||||
|
||||
private final static String JMX_PROPERTIES = "{\n" + "\t\"maxConn\": 100000\n" + "}";
|
||||
private final static Integer STATUS = 1;
|
||||
|
||||
private final static String REAL_APP_ID = "dkm_admin";
|
||||
@Value("${test.app.id}")
|
||||
private String REAL_APP_ID;
|
||||
|
||||
// 要求消费moduleTest这个topic的消费者所属的消费者组是moduleTestGroup
|
||||
private final static String REAL_CONSUMER_GROUP_ID = "moduleTestGroup";
|
||||
@Value("${test.consumer-group}")
|
||||
private String REAL_CONSUMER_GROUP_ID;
|
||||
|
||||
@Autowired
|
||||
@InjectMocks
|
||||
|
||||
@@ -96,3 +96,32 @@ notify:
|
||||
topic-name: didi-kafka-notify
|
||||
order:
|
||||
detail-url: http://127.0.0.1
|
||||
|
||||
test:
|
||||
topic:
|
||||
name1: moduleTest
|
||||
name2: xgTest
|
||||
name3: expandPartitionTopic
|
||||
name4: topic_a
|
||||
name5: NoOffsetChangeTopic
|
||||
name6: _consumer_offsets
|
||||
phyCluster:
|
||||
id: 1
|
||||
name: LogiKM_moduleTest
|
||||
logicalCluster:
|
||||
name: logical_cluster_1
|
||||
broker:
|
||||
id1: 1
|
||||
id2: 2
|
||||
id3: 3
|
||||
app:
|
||||
id: dkm_admin
|
||||
ZK:
|
||||
address: 10.190.12.242:2181,10.190.25.160:2181,10.190.25.41:2181/wyc
|
||||
bootstrap-servers: 10.190.12.242:9093,10.190.25.160:9093,10.190.25.41:9093
|
||||
gateway: 172.23.161.128
|
||||
sasl-plaintext: SASL_PLAINTEXT://10.179.162.202:9093
|
||||
admin: admin
|
||||
consumer-group: moduleTestGroup
|
||||
client-id: dkm_admin.moduleTest
|
||||
region-name: region_1
|
||||
Reference in New Issue
Block a user