mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-13 01:50:40 +02:00
refactor: run Spark tests fully in Docker with bridge network
Better approach than mixing host and container networks. Changes to docker-compose.yml: - Remove 'network_mode: host' from spark-tests container - Add spark-tests to seaweedfs-spark bridge network - Update SEAWEEDFS_FILER_HOST from 'localhost' to 'seaweedfs-filer' - Add depends_on to ensure services are healthy before tests - Update volume publicUrl from 'localhost:8080' to 'seaweedfs-volume:8080' Changes to workflow: - Remove separate build and test steps - Run tests via 'docker compose up spark-tests' - Use --abort-on-container-exit and --exit-code-from for proper exit codes - Simpler: one step instead of two Benefits: ✓ All components use Docker DNS (seaweedfs-master, seaweedfs-volume, seaweedfs-filer) ✓ No host/container network split or DNS resolution issues ✓ Consistent with how other SeaweedFS integration tests work ✓ Tests are fully containerized and reproducible ✓ Volume server accessible via seaweedfs-volume:8080 for all clients ✓ Automatic volume creation works (master can reach volume via gRPC) ✓ Data writes work (Spark can reach volume via Docker network) This matches the architecture of other integration tests and is cleaner.
This commit is contained in:
@@ -185,23 +185,11 @@ jobs:
|
||||
curl -s http://localhost:9333/dir/status | jq '.' || echo "jq not available"
|
||||
echo "✓ Volume server registered, volumes will be created on-demand during tests"
|
||||
|
||||
- name: Build Spark integration tests
|
||||
- name: Run Spark integration tests in Docker
|
||||
working-directory: test/java/spark
|
||||
run: |
|
||||
echo "Building Spark integration tests..."
|
||||
mvn clean package -DskipTests
|
||||
echo "✓ Build completed"
|
||||
|
||||
- name: Run Spark integration tests
|
||||
working-directory: test/java/spark
|
||||
env:
|
||||
SEAWEEDFS_TEST_ENABLED: true
|
||||
SEAWEEDFS_FILER_HOST: localhost
|
||||
SEAWEEDFS_FILER_PORT: 8888
|
||||
SEAWEEDFS_FILER_GRPC_PORT: 18888
|
||||
run: |
|
||||
echo "Running Spark integration tests..."
|
||||
mvn test -B
|
||||
echo "Running Spark integration tests in Docker container..."
|
||||
docker compose up --abort-on-container-exit --exit-code-from spark-tests spark-tests
|
||||
echo "✓ Tests completed"
|
||||
|
||||
- name: Upload test results
|
||||
|
||||
Reference in New Issue
Block a user