Skip to content

Commit 21d426d

Browse files
committed
f: give some time for electrs to boot up before launching python and kotlin tests
1 parent 631cea9 commit 21d426d

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/kotlin.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ jobs:
5151

5252
- name: Run ldk-node-jvm tests
5353
run: |
54+
for i in {1..120}; do
55+
if curl --fail --silent --show-error --output /dev/null "http://127.0.0.1:3002/blocks/tip/height"; then
56+
break
57+
fi
58+
59+
if [ "$i" -eq 120 ]; then
60+
echo "Esplora endpoint did not become ready in time"
61+
exit 1
62+
fi
63+
64+
sleep 1
65+
done
5466
cd $LDK_NODE_JVM_DIR
5567
./gradlew test -Penv=ci
5668

.github/workflows/python.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,17 @@ jobs:
3333
BITCOIND_RPC_PASSWORD: "pass"
3434
ESPLORA_ENDPOINT: "http://127.0.0.1:3002"
3535
run: |
36+
for i in {1..120}; do
37+
if curl --fail --silent --show-error --output /dev/null "$ESPLORA_ENDPOINT/blocks/tip/height"; then
38+
break
39+
fi
40+
41+
if [ "$i" -eq 120 ]; then
42+
echo "Esplora endpoint $ESPLORA_ENDPOINT did not become ready in time"
43+
exit 1
44+
fi
45+
46+
sleep 1
47+
done
3648
cd $LDK_NODE_PYTHON_DIR
3749
uv run --group dev python -m unittest discover -s src/ldk_node

0 commit comments

Comments
 (0)