aboutsummaryrefslogtreecommitdiff
path: root/test/java/spark/run-tests.sh
blob: f637c8c5908ef286b4c52d30a1a805f510f7e440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

set -e

echo "=== SeaweedFS Spark Integration Tests Runner ==="
echo ""

# Check if SeaweedFS is running
check_seaweedfs() {
    if curl -f http://localhost:8888/ > /dev/null 2>&1; then
        echo "✓ SeaweedFS filer is accessible at http://localhost:8888"
        return 0
    else
        echo "✗ SeaweedFS filer is not accessible"
        return 1
    fi
}

# Main
if ! check_seaweedfs; then
    echo ""
    echo "Please start SeaweedFS first. You can use:"
    echo "  cd test/java/spark && docker-compose up -d"
    echo "Or:"
    echo "  make docker-up"
    exit 1
fi

echo ""
echo "Running Spark integration tests..."
echo ""

export SEAWEEDFS_TEST_ENABLED=true
export SEAWEEDFS_FILER_HOST=localhost
export SEAWEEDFS_FILER_PORT=8888
export SEAWEEDFS_FILER_GRPC_PORT=18888

# Run tests
mvn test "$@"

echo ""
echo "✓ Test run completed"
echo "View detailed reports in: target/surefire-reports/"