Skip to content

Commit

Permalink
CI: optimize settings for random test. (#4162)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 authored Nov 13, 2023
1 parent c224e22 commit a9d2ce1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/scripts/testVersionCompatible.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from xmlrpc.client import boolean
import hypothesis
from hypothesis.stateful import rule, precondition, RuleBasedStateMachine
from hypothesis import Phase, assume, strategies as st
from hypothesis import Phase, Verbosity, assume, strategies as st
from hypothesis import seed
from packaging import version
import subprocess
Expand All @@ -32,7 +32,13 @@
import random

@seed(random.randint(10000, 1000000))
@hypothesis.settings(max_examples=100, stateful_step_count=30, deadline=None, phases=[Phase.explicit, Phase.reuse, Phase.generate, Phase.target, Phase.shrink ])
@hypothesis.settings(
verbosity=Verbosity.debug,
max_examples=100,
stateful_step_count=30,
deadline=None,
report_multiple_bugs=False,
phases=[Phase.explicit, Phase.reuse, Phase.generate, Phase.target, Phase.shrink, Phase.explain])
class JuicefsMachine(RuleBasedStateMachine):
MIN_CLIENT_VERSIONS = ['0.0.1', '0.0.17','1.0.0-beta1', '1.0.0-rc1']
MAX_CLIENT_VERSIONS = ['1.2.0', '2.0.0']
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/version_compatible_hypo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ jobs:
echo old_version is $old_version
mv ${{matrix.old_juicefs_version}}/juicefs juicefs-$old_version
export OLD_JFS_BIN="juicefs-$old_version"
timeout 3600 python3 .github/scripts/testVersionCompatible.py || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then echo test failed; exit $code; fi
timeout 3600 python3 .github/scripts/testVersionCompatible.py 2>&1 | tee result.log || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then echo test failed; exit $code; fi
- name: Display result log
if: always()
run: |
if [ -f "result.log" ]; then
tail -n 500 result.log
fi
- name: Upload command log
if: always()
Expand Down

0 comments on commit a9d2ce1

Please sign in to comment.