This is an automated email from the ASF dual-hosted git repository. miao pushed a commit to branch rel/1.2_rest_it in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 5bb36b68ac50f181cbbaf8f5e36e556758ed3e45 Author: Cloudwise_Luke <[email protected]> AuthorDate: Wed Sep 27 10:34:48 2023 +0800 it test --- integration-test/pom.xml | 28 ++++++++++++++++++++++ .../iotdb/it/env/cluster/DataNodeWrapper.java | 16 +++++++++++++ .../org/apache/iotdb/it/env/cluster/EnvUtils.java | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/integration-test/pom.xml b/integration-test/pom.xml index e05fbd30c9a..c9b6163dd15 100644 --- a/integration-test/pom.xml +++ b/integration-test/pom.xml @@ -326,6 +326,34 @@ <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> </exclusion> + <exclusion> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-core</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-client</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet-core</artifactId> + </exclusion> + <exclusion> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-hk2</artifactId> + </exclusion> </exclusions> </dependency> <dependency> diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/DataNodeWrapper.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/DataNodeWrapper.java index c9e828c4795..d65db7a170b 100644 --- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/DataNodeWrapper.java +++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/DataNodeWrapper.java @@ -33,6 +33,8 @@ public class DataNodeWrapper extends AbstractNodeWrapper { private final int schemaRegionConsensusPort; private final int mqttPort; + private final int restServicePort; + private final String defaultNodePropertiesFile = EnvUtils.getFilePathFromSysVar("DefaultDataNodeProperties"); private final String defaultCommonPropertiesFile = @@ -46,7 +48,9 @@ public class DataNodeWrapper extends AbstractNodeWrapper { this.internalPort = portList[2]; this.dataRegionConsensusPort = portList[3]; this.schemaRegionConsensusPort = portList[4]; + this.mqttPort = portList[5]; + this.restServicePort = portList[10] + 6000; // Initialize mutable properties reloadMutableFields(); @@ -55,6 +59,11 @@ public class DataNodeWrapper extends AbstractNodeWrapper { // Override mqtt properties of super class immutableCommonProperties.setProperty("mqtt_host", super.getIp()); immutableCommonProperties.setProperty("mqtt_port", String.valueOf(this.mqttPort)); + immutableCommonProperties.setProperty("rest_service_port", String.valueOf(restServicePort)); + immutableCommonProperties.setProperty("enable_rest_service", "true"); + immutableCommonProperties.setProperty("enable_swagger", "false"); + immutableCommonProperties.setProperty("rest_query_default_row_size_limit", "10000"); + immutableCommonProperties.setProperty("cache_expire_in_seconds", "28800"); immutableNodeProperties.setProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE_LIST, targetConfigNode); immutableNodeProperties.setProperty("dn_system_dir", MppBaseConfig.NULL_VALUE); @@ -140,6 +149,9 @@ public class DataNodeWrapper extends AbstractNodeWrapper { mutableCommonProperties.put("max_tsblock_size_in_bytes", "1024"); mutableCommonProperties.put("page_size_in_byte", "1024"); + mutableCommonProperties.put("enable_rest_service", "true"); + mutableCommonProperties.put("rest_service_port", String.valueOf(this.restServicePort)); + mutableNodeProperties.put("dn_join_cluster_retry_interval_ms", "1000"); mutableNodeProperties.put("dn_connection_timeout_ms", "30000"); mutableNodeProperties.put("dn_metric_internal_reporter_type", "MEMORY"); @@ -207,6 +219,10 @@ public class DataNodeWrapper extends AbstractNodeWrapper { return dataRegionConsensusPort; } + public int getRestServicePort() { + return restServicePort; + } + public int getSchemaRegionConsensusPort() { return schemaRegionConsensusPort; } diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java index 48c08e69c2e..4cbef9981a5 100644 --- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java +++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/EnvUtils.java @@ -49,7 +49,7 @@ public class EnvUtils { continue; } List<Integer> requiredPorts = - IntStream.rangeClosed(randomPortStart, randomPortStart + 9) + IntStream.rangeClosed(randomPortStart, randomPortStart + 10) .boxed() .collect(Collectors.toList()); if (checkPortsAvailable(requiredPorts)) {
