mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-21 23:19:53 +00:00
chore(regression): test bptree on regression pytests (#1963)
* chore(regression): test bptree on regression pytests 1. stop passing the flag use_zset_tree as it is true on default 2. fix ci test to run replication tests 3. change replication tests seeder to sometimes add more than 128 values to zset to test the pbtree impl Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
parent
57441f9863
commit
84d4ba4d69
4
.github/actions/regression-tests/action.yml
vendored
4
.github/actions/regression-tests/action.yml
vendored
@ -39,10 +39,10 @@ runs:
|
||||
pytest -m "${{inputs.filter}}" --json-report --json-report-file=report.json dragonfly --ignore=dragonfly/replication_test.py --log-cli-level=INFO
|
||||
|
||||
- name: Run PyTests replication test
|
||||
if: ${{ inputs.run-only-on-ubuntu-latest == 'false' || matrix.runner == 'ubuntu-latest' }}
|
||||
if: ${{ inputs.run-only-on-ubuntu-latest == 'true' || (inputs.run-only-on-ubuntu-latest == 'false' && matrix.runner == 'ubuntu-latest') }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Running PyTests replication test with flag: ${{ inputs.run-only-on-ubuntu-latest }}"
|
||||
echo "Running PyTests replication test"
|
||||
cd ${GITHUB_WORKSPACE}/tests
|
||||
# used by PyTests
|
||||
export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}"
|
||||
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -104,8 +104,8 @@ jobs:
|
||||
#GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1
|
||||
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
|
||||
|
||||
echo "Running tests with --force_epoll and --use_zset_tree"
|
||||
FLAGS_force_epoll=true FLAGS_use_zset_tree=true ctest -V -L DFLY
|
||||
echo "Running tests with --force_epoll"
|
||||
FLAGS_force_epoll=true ctest -V -L DFLY
|
||||
|
||||
echo "Running tests with --cluster_mode=emulated"
|
||||
FLAGS_cluster_mode=emulated ctest -V -L DFLY
|
||||
|
4
.github/workflows/regression-tests.yml
vendored
4
.github/workflows/regression-tests.yml
vendored
@ -2,7 +2,7 @@ name: Regression Tests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0/3 * * *'
|
||||
- cron: "0 0/3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -40,5 +40,5 @@ jobs:
|
||||
with:
|
||||
dfly-executable: dragonfly
|
||||
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
|
||||
run-only-on-ubuntu-latest: true
|
||||
run-only-on-ubuntu-latest: false
|
||||
build-folder-name: build
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -137,7 +137,7 @@ jobs:
|
||||
with:
|
||||
dfly-executable: dragonfly-x86_64
|
||||
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
|
||||
run-only-on-ubuntu-latest: false
|
||||
run-only-on-ubuntu-latest: true
|
||||
build-folder-name: build-opt
|
||||
- name: Save artifacts
|
||||
run: |
|
||||
|
@ -154,8 +154,7 @@ class DflyInstance:
|
||||
if self.dynamic_port:
|
||||
self._port = None
|
||||
|
||||
base_args = []
|
||||
all_args = self.format_args(self.args) + base_args
|
||||
all_args = self.format_args(self.args)
|
||||
logging.debug(f"Starting instance with arguments {all_args} from {self.params.path}")
|
||||
|
||||
run_cmd = [self.params.path, *all_args]
|
||||
|
@ -166,10 +166,12 @@ class CommandGenerator:
|
||||
)
|
||||
return ("v0", 0, "v1", 0) + tuple(itertools.chain(*elements))
|
||||
elif t == ValueType.ZSET:
|
||||
# Random sequnce of k-letter keys and int score for ZSET
|
||||
elements = (
|
||||
(random.randint(0, self.val_size), rand_str()) for _ in range(self.val_size // 4)
|
||||
)
|
||||
# Random sequnce of k-letter members and int score for ZADD
|
||||
# The length of the sequence will vary between val_size/4 and 130. This ensures that we test both the ZSET implementation with Lispack and the bptree.
|
||||
value_sizes = [self.val_size // 4, 130]
|
||||
probabilities = [4, 1]
|
||||
value_size = random.choices(value_sizes, probabilities)[0]
|
||||
elements = ((random.randint(0, self.val_size), rand_str()) for _ in range(value_size))
|
||||
return tuple(itertools.chain(*elements))
|
||||
|
||||
elif t == ValueType.JSON:
|
||||
|
Loading…
Reference in New Issue
Block a user