Skip to content

Commit 455cc8d

Browse files
author
Johannes Lichtenberger
committed
Fix SirixDB healthcheck to use HTTP instead of HTTPS
- Changed healthcheck from https://localhost:9443 to http://localhost:9443 - Tests use HTTP, not HTTPS, so healthcheck must match - Improved test.sh with better error handling and container status output - Added exit with error and logs if SirixDB fails to start - This should fix the infinite waiting loop in CI
1 parent eebb2a8 commit 455cc8d

2 files changed

Lines changed: 33 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
echo "Checking Keycloak..."
3131
curl -f http://localhost:8080/realms/master || echo "Keycloak not ready"
3232
echo "Checking SirixDB..."
33-
curl -k -f https://localhost:9443 || echo "SirixDB not ready"
33+
curl -f http://localhost:9443 || echo "SirixDB not ready"
3434
- name: install dependencies
3535
run: |
3636
python -m pip install --upgrade pip

test.sh

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
1-
echo "starting the docker environment"
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Starting the docker environment..."
25
docker compose -f ./tests/resources/docker-compose.yml up -d keycloak
3-
echo "waiting for keycloak to be ready..."
6+
7+
echo "Waiting for Keycloak to be ready..."
48
bash ./tests/resources/wait.sh
9+
echo "Keycloak is ready!"
10+
11+
echo "Starting SirixDB server..."
512
docker compose -f ./tests/resources/docker-compose.yml up -d server
6-
echo "waiting for sirix server to be ready..."
7-
bash -c 'for i in {1..30}; do if curl -k -s -f https://localhost:9443 > /dev/null 2>&1; then echo "SirixDB is ready"; break; fi; echo "Waiting for SirixDB..."; sleep 2; done'
13+
14+
echo "Waiting for SirixDB server to be ready..."
15+
for i in {1..30}; do
16+
if curl -s -f http://localhost:9443 > /dev/null 2>&1; then
17+
echo "SirixDB is ready!"
18+
exit 0
19+
fi
20+
21+
# Show container status every 5 iterations
22+
if [ $((i % 5)) -eq 0 ]; then
23+
echo "Still waiting... (attempt $i/30)"
24+
docker ps --filter "name=server" --format "table {{.Names}}\t{{.Status}}"
25+
else
26+
echo "Waiting for SirixDB... (attempt $i/30)"
27+
fi
28+
29+
sleep 2
30+
done
31+
32+
echo "ERROR: SirixDB failed to become ready after 60 seconds"
33+
echo "Container logs:"
34+
docker compose -f ./tests/resources/docker-compose.yml logs server
35+
exit 1

0 commit comments

Comments
 (0)