mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 18:25:44 +00:00
## Summary Extends the CDC (replication) e2e test suite with comprehensive cross-feature coverage and switchover/failover scenarios on top of #45624. ## What's Added ### New test files (\`tests/python_client/cdc/testcases/\`) - \`test_fts_and_text.py\` — BM25 search, text_match, phrase_match, hybrid FTS+dense, FTS after switchover (5 tests × 2 analyzers) - \`test_schema_features.py\` — dynamic schema, nullable, defaults, partition key, clustering key, combined features (7 tests) - \`test_collection_properties.py\` — TTL, mmap, autocompaction, multi-property, drop property (5 tests) - \`test_resource_group.py\` — create, drop, update, transfer replica (4 tests) - \`test_multi_database.py\` — cross-DB collections, drop DB with collections, cross-DB operations (3 tests) - \`test_search_verification.py\` — 6 tests × 7 vector types (search result consistency, query data sampling, hybrid search, iterators, filtered search) - \`test_switchover.py\` — basic, during-writes, all-types, loaded, indexed, rapid stress, failover (7 tests) ### Shared utilities - \`base.py\`: +7 schema factories, +4 data generators, +4 verification helpers, +2 constants - \`conftest.py\`: +\`switchover_helper\` fixture, +\`--is-check\`/\`--milvus-ns\` options ## Test plan - [ ] Run \`pytest tests/python_client/cdc/testcases/\` against two-cluster CDC deployment - [ ] Verify each test file runs independently via \`pytest testcases/test_<name>.py\` - [ ] Companion PR in zilliztech/test-jobs adds Jenkins pipelines to run these issue: #49042 pr: #45624 /kind test /kind improvement 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Yihao Dai <yihao.dai@zilliz.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Python Lint (tests/)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'tests/**/*.py'
|
|
- 'tests/ruff.toml'
|
|
- '.github/workflows/python-lint.yaml'
|
|
pull_request:
|
|
paths:
|
|
- 'tests/**/*.py'
|
|
- 'tests/ruff.toml'
|
|
- '.github/workflows/python-lint.yaml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
ruff:
|
|
name: Ruff (changed files only)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Detect changed Python files under tests/
|
|
id: changed
|
|
uses: tj-actions/changed-files@v46
|
|
with:
|
|
files: tests/**/*.py
|
|
|
|
- name: ruff check
|
|
if: steps.changed.outputs.any_changed == 'true'
|
|
uses: astral-sh/ruff-action@v4.0.0
|
|
with:
|
|
version: "0.15.11"
|
|
src: ${{ steps.changed.outputs.all_changed_files }}
|
|
|
|
- name: ruff format --check
|
|
if: steps.changed.outputs.any_changed == 'true'
|
|
uses: astral-sh/ruff-action@v4.0.0
|
|
with:
|
|
version: "0.15.11"
|
|
src: ${{ steps.changed.outputs.all_changed_files }}
|
|
args: "format --check --diff"
|
|
|
|
- name: Validate ruff configuration (smoke test)
|
|
# Always runs so config-only PRs still catch a broken ruff.toml.
|
|
# --exit-zero ignores existing baseline violations; only fails when
|
|
# ruff cannot load the config at all.
|
|
uses: astral-sh/ruff-action@v4.0.0
|
|
with:
|
|
version: "0.15.11"
|
|
src: "tests/scripts"
|
|
args: "check --exit-zero"
|