-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: run the local-resume-test 5 times
- Loading branch information
Showing
1 changed file
with
49 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,50 @@ | ||
# #!/bin/bash | ||
${FLUVIO_BIN} cluster delete --force | ||
rm -rf ~/.fluvio | ||
${FLUVIO_BIN} cluster start --local | ||
|
||
seq 1 10 | parallel -j 10 ${FLUVIO_BIN} topic create test-topic-{} | ||
seq 1 10 | parallel -j 10 ${FLUVIO_BIN} remote register test-remote-{} | ||
|
||
${FLUVIO_BIN} cluster shutdown | ||
${FLUVIO_BIN} cluster resume | ||
|
||
# Create topic | ||
${FLUVIO_BIN} topic create test-topic-11 # THIS WAS HANGING | ||
|
||
TOPIC_LIST=$(${FLUVIO_BIN} topic list 2>/dev/null) | ||
PARTITION_LIST=$(${FLUVIO_BIN} partition list 2>/dev/null) | ||
REMOTE_LIST=$(${FLUVIO_BIN} remote list 2>/dev/null) | ||
|
||
# Check if the topic list has 11+1 lines | ||
if [ $(echo "$TOPIC_LIST" | wc -l) -eq 12 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
|
||
# Check if the partition list has 11+1 lines | ||
if [ $(echo "$PARTITION_LIST" | wc -l) -eq 12 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
|
||
# Check if the remote list has 10+1 lines | ||
if [ $(echo "$REMOTE_LIST" | wc -l) -eq 11 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
|
||
function run_test() { | ||
${FLUVIO_BIN} cluster delete --force | ||
# rm -rf ~/.fluvio | ||
${FLUVIO_BIN} cluster start --local | ||
|
||
seq 1 10 | parallel -j 10 ${FLUVIO_BIN} topic create test-topic-{} | ||
seq 1 10 | parallel -j 10 ${FLUVIO_BIN} remote register test-remote-{} | ||
|
||
${FLUVIO_BIN} cluster shutdown | ||
${FLUVIO_BIN} cluster resume | ||
|
||
# Create topic | ||
${FLUVIO_BIN} topic create test-topic-11 # THIS WAS HANGING | ||
|
||
TOPIC_LIST=$(${FLUVIO_BIN} topic list 2>/dev/null) | ||
PARTITION_LIST=$(${FLUVIO_BIN} partition list 2>/dev/null) | ||
REMOTE_LIST=$(${FLUVIO_BIN} remote list 2>/dev/null) | ||
|
||
# Check if the topic list has 11+1 lines | ||
if [ $(echo "$TOPIC_LIST" | wc -l) -eq 12 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
|
||
# Check if the partition list has 11+1 lines | ||
if [ $(echo "$PARTITION_LIST" | wc -l) -eq 12 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
|
||
# Check if the remote list has 10+1 lines | ||
if [ $(echo "$REMOTE_LIST" | wc -l) -eq 11 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
fi | ||
} | ||
|
||
function main() { | ||
for i in {1..5} | ||
do | ||
run_test | ||
done | ||
} | ||
|
||
main; |