Skip to content

Commit b5c9832

Browse files
Fix pulsar test script (#1211)
1 parent a0a4dc7 commit b5c9832

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_pulsar/pulsar_test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ bin/pulsar-daemon start standalone
3636

3737
echo "Waiting for Pulsar service ready or 30 seconds passed"
3838
for i in {1..30}; do
39-
RESPONSE=$(curl --write-out '%{http_code}' --silent -o /dev/null -L http://localhost:8080/metrics) || true
39+
RESPONSE=$(curl --write-out '%{http_code}' --silent -o /dev/null -L http://localhost:8080/admin/v2/persistent/public/default) || true
4040
if [[ $RESPONSE == 200 ]]; then
41-
echo "[$i] Fetch metrics successfully"
41+
echo "[$i] Access namespace public/default successfully"
4242
break
4343
fi
44-
echo "[$i] Fetch metrics failed: $RESPONSE, sleep for 1 second"
44+
echo "[$i] Access namespace public/default failed: $RESPONSE, sleep for 1 second"
4545
sleep 1
4646
done
47+
echo "Sleep for 5 seconds more to avoid flaky test"
48+
sleep 5
4749

4850
echo "Creating and populating 'test' topic with sample non-keyed messages"
4951
bin/pulsar-client produce -m "D0,D1,D2,D3,D4,D5" test

0 commit comments

Comments
 (0)