-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
119 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Weekly tests | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: weekly-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
weekly_longevity: | ||
name: Weekly Longevity test | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 120 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust-target: [x86_64-unknown-linux-musl] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Fluvio | ||
uses: infinyon/fluvio/.github/actions/setup-fluvio@master | ||
with: | ||
version: latest | ||
- name: Run Resume test | ||
timeout-minutes: 60 | ||
run: | | ||
FLUVIO_BIN=fluvio INTERACTIONS=100 make resume-test | ||
- name: Run diagnostics | ||
if: failure() | ||
timeout-minutes: 5 | ||
run: fluvio cluster diagnostics | ||
- name: Upload diagnostics | ||
uses: actions/upload-artifact@v4 | ||
timeout-minutes: 5 | ||
if: failure() | ||
with: | ||
name: weekly-longevity.diag | ||
path: diagnostics*.gz | ||
- name: Slack Notification | ||
uses: 8398a7/action-slack@v3 | ||
if: ${{ !success() }} | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,message,commit,author,action,eventName,ref,workflow,job | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
MATRIX_CONTEXT: ${{ toJson(matrix) }} |
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
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
readonly INTERACTIONS=${INTERACTIONS:-5} | ||
|
||
function run_test() { | ||
${FLUVIO_BIN} cluster delete --force | ||
${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" | ||
exit 1 | ||
fi | ||
|
||
# Check if the partition list has 11+1 lines | ||
if [ $(echo "$PARTITION_LIST" | wc -l) -eq 12 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
exit 1 | ||
fi | ||
|
||
# Check if the remote list has 10+1 lines | ||
if [ $(echo "$REMOTE_LIST" | wc -l) -eq 11 ]; then | ||
echo "PASS" | ||
else | ||
echo "FAIL" | ||
exit 1 | ||
fi | ||
} | ||
|
||
function main() { | ||
for i in $(seq 1 $INTERACTIONS); | ||
do | ||
echo "INTERATION: $i" | ||
run_test | ||
done | ||
} | ||
|
||
main; |