Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker/docker-compose-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ services:
ports:
- 8000:8080
- 8127:5000
volumes:
# Shared with host so file:// URIs from the server resolve on the e2e runner.
- /tmp/conductor-file-storage-e2e:/tmp/conductor-file-storage-e2e
healthcheck:
test: [ "CMD", "curl","-I" ,"-XGET", "http://localhost:8080/health" ]
interval: 60s
Expand Down
8 changes: 7 additions & 1 deletion docker/server/config/config-postgres.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ management.endpoints.web.exposure.include=prometheus
loadSample=true

# Shorten postpone duration to speed up concurrent execution limit tests (default is 60s)
conductor.app.taskExecutionPostponeDuration=10s
conductor.app.taskExecutionPostponeDuration=10s

# File-storage: local backend shared with the host via bind mount so file:// URIs resolve
# identically on both sides. Required by FileStorageE2ETest.
conductor.file-storage.enabled=true
conductor.file-storage.type=local
conductor.file-storage.local.directory=/tmp/conductor-file-storage-e2e
9 changes: 8 additions & 1 deletion e2e/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ dependencies {
}

test {
useJUnitPlatform()
useJUnitPlatform {
// FileStorageE2ETest needs conductor.file-storage.enabled=true server-side (only
// postgres and redis-es8 configs set it). Skipped by default everywhere else;
// opt in with -PrunFileStorageTests.
if (!project.hasProperty('runFileStorageTests')) {
excludeTags 'file-storage'
}
}
maxParallelForks = 4
minHeapSize = '512m'
maxHeapSize = '2g'
Expand Down
2 changes: 1 addition & 1 deletion e2e/run_tests-es8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ done

cd "$SCRIPT_DIR/.."
set +e
./gradlew :conductor-e2e:test -PrunE2E -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
./gradlew :conductor-e2e:test -PrunE2E -PrunFileStorageTests -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
EXIT_CODE=$?
exit $EXIT_CODE
7 changes: 6 additions & 1 deletion e2e/run_tests-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
COMPOSE_FILE="$SCRIPT_DIR/../docker/docker-compose-postgres.yaml"
STORAGE_DIR="/tmp/conductor-file-storage-e2e"
export SERVER_ROOT_URI="${SERVER_ROOT_URI:-http://localhost:8000}"

echo "Preparing shared storage dir at $STORAGE_DIR ..."
rm -rf "$STORAGE_DIR"
mkdir -p "$STORAGE_DIR"

echo "Starting Conductor (Postgres + Elasticsearch 7)..."
docker compose -f "$COMPOSE_FILE" build conductor-server
docker compose -f "$COMPOSE_FILE" up -d
Expand All @@ -26,7 +31,7 @@ for i in $(seq 1 60); do
done

cd "$SCRIPT_DIR/.."
./gradlew :conductor-e2e:test -PrunE2E -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
./gradlew :conductor-e2e:test -PrunE2E -PrunFileStorageTests -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
EXIT_CODE=$?

docker compose -f "$COMPOSE_FILE" down -v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Map;
import java.util.UUID;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import com.netflix.conductor.client.exception.ConductorClientException;
Expand All @@ -39,8 +40,11 @@
* {@code type=local}). A bind mount shares the server's storage directory with the host so the
* {@code file:///...} URIs returned by the API resolve on both sides.
*
* <p>Run via: {@code e2e/run_tests-es8.sh}.
* <p>Tagged {@code file-storage}; excluded by default (see {@code e2e/build.gradle}). Only {@code
* e2e/run_tests-postgres.sh} and {@code e2e/run_tests-es8.sh} opt back in with {@code
* -PrunFileStorageTests}, since those are the only lanes whose server config enables file-storage.
*/
@Tag("file-storage")
class FileStorageE2ETest {

private static final TypeReference<Map<String, Object>> MAP_TYPE = new TypeReference<>() {};
Expand Down
Loading