Browse Source

[Fix-16228] Fix E2E health check url is not correct (#16227)

dev
Wenjun Ruan 5 months ago committed by GitHub
parent
commit
0e2d0fb81e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/basic/docker-compose.yaml
  2. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-clickhouse/docker-compose.yaml
  3. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-hive/docker-compose.yaml
  4. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-mysql/docker-compose.yaml
  5. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-postgresql/docker-compose.yaml
  6. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-sqlserver/docker-compose.yaml
  7. 3
      dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/file-manage/docker-compose.yaml
  8. 5
      dolphinscheduler-api-test/dolphinscheduler-api-test-core/src/main/java/org/apache/dolphinscheduler/api/test/core/DolphinSchedulerExtension.java
  9. 10
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/repository/impl/CommandDaoImplTest.java
  10. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/basic/docker-compose.yaml
  11. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-clickhouse/docker-compose.yaml
  12. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-hive/docker-compose.yaml
  13. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/docker-compose.yaml
  14. 4
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-postgresql/docker-compose.yaml
  15. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-sqlserver/docker-compose.yaml
  16. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml
  17. 2
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/workflow-http/docker-compose.yaml

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/basic/docker-compose.yaml

@ -21,7 +21,6 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
@ -29,7 +28,7 @@ services:
network: network:
ipv4_address: 10.5.0.5 ipv4_address: 10.5.0.5
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-clickhouse/docker-compose.yaml

@ -21,14 +21,13 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
networks: networks:
- api-test - api-test
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-hive/docker-compose.yaml

@ -21,14 +21,13 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
networks: networks:
- api-test - api-test
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-mysql/docker-compose.yaml

@ -21,7 +21,6 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
@ -31,7 +30,7 @@ services:
- ./download-mysql.sh:/tmp/download-mysql.sh - ./download-mysql.sh:/tmp/download-mysql.sh
entrypoint: [ 'bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null' ] entrypoint: [ 'bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null' ]
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-postgresql/docker-compose.yaml

@ -21,14 +21,13 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
networks: networks:
- api-test - api-test
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/datasource-sqlserver/docker-compose.yaml

@ -21,14 +21,13 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
networks: networks:
- api-test - api-test
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

3
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/file-manage/docker-compose.yaml

@ -21,14 +21,13 @@ services:
dolphinscheduler: dolphinscheduler:
image: apache/dolphinscheduler-standalone-server:ci image: apache/dolphinscheduler-standalone-server:ci
environment: environment:
MASTER_MAX_CPU_LOAD_AVG: 100
WORKER_TENANT_AUTO_CREATE: 'true' WORKER_TENANT_AUTO_CREATE: 'true'
ports: ports:
- "12345:12345" - "12345:12345"
networks: networks:
- api-test - api-test
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 60s timeout: 60s
retries: 120 retries: 120

5
dolphinscheduler-api-test/dolphinscheduler-api-test-core/src/main/java/org/apache/dolphinscheduler/api/test/core/DolphinSchedulerExtension.java

@ -24,6 +24,7 @@ import java.net.URL;
import java.time.Duration; import java.time.Duration;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -31,6 +32,7 @@ import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback; import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.ExtensionContext;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.testcontainers.containers.ContainerState;
import org.testcontainers.containers.DockerComposeContainer; import org.testcontainers.containers.DockerComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.containers.wait.strategy.Wait;
@ -49,6 +51,9 @@ final class DolphinSchedulerExtension implements BeforeAllCallback, AfterAllCall
if (!localMode) { if (!localMode) {
compose = createDockerCompose(context); compose = createDockerCompose(context);
compose.start(); compose.start();
compose.getContainerByServiceName(serviceName)
.map(ContainerState::isHealthy)
.orElseThrow(() -> new IllegalStateException("DolphinScheduler service is not healthy"));
} }
} }

10
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/repository/impl/CommandDaoImplTest.java

@ -18,7 +18,6 @@
package org.apache.dolphinscheduler.dao.repository.impl; package org.apache.dolphinscheduler.dao.repository.impl;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.FailureStrategy;
@ -34,7 +33,6 @@ import org.apache.dolphinscheduler.dao.utils.WorkerGroupUtils;
import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.RandomUtils;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.RepeatedTest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -63,14 +61,6 @@ class CommandDaoImplTest extends BaseDaoTest {
} }
List<Command> commands = commandDao.queryCommandByIdSlot(currentSlotIndex, totalSlot, idStep, fetchSize); List<Command> commands = commandDao.queryCommandByIdSlot(currentSlotIndex, totalSlot, idStep, fetchSize);
assertFalse(commands.isEmpty(),
"Commands should not be empty, currentSlotIndex: " + currentSlotIndex +
", totalSlot: " + totalSlot +
", idStep: " + idStep +
", fetchSize: " + fetchSize +
", total command size: " + commandSize +
", total commands: "
+ commandDao.queryAll().stream().map(Command::getId).collect(Collectors.toList()));
assertThat(commands.size()) assertThat(commands.size())
.isEqualTo(commandDao.queryAll() .isEqualTo(commandDao.queryAll()
.stream() .stream()

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/basic/docker-compose.yaml

@ -28,7 +28,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-clickhouse/docker-compose.yaml

@ -28,7 +28,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-hive/docker-compose.yaml

@ -28,7 +28,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/docker-compose.yaml

@ -31,7 +31,7 @@ services:
- ./download-mysql.sh:/tmp/download-mysql.sh - ./download-mysql.sh:/tmp/download-mysql.sh
entrypoint: ['bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null'] entrypoint: ['bash', '-c', '/bin/bash /tmp/download-mysql.sh && /opt/dolphinscheduler/bin/start.sh && tail -f /dev/null']
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

4
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-postgresql/docker-compose.yaml

@ -28,9 +28,9 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 300s timeout: 5s
retries: 120 retries: 120
depends_on: depends_on:
postgres: postgres:

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-sqlserver/docker-compose.yaml

@ -28,7 +28,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/file-manage/docker-compose.yaml

@ -28,7 +28,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

2
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/workflow-http/docker-compose.yaml

@ -29,7 +29,7 @@ services:
networks: networks:
- e2e - e2e
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 120 retries: 120

Loading…
Cancel
Save