40 Commits
Author SHA1 Message Date
224f4ab7e9 fix: use correct MinIO root path in text LOB layout test (#51535)
## What this PR does

- Change the default `MILVUS_MINIO_ROOT_PATH` from `files` to `file` in
the Text LOB inline/object layout test.
- Keep the environment-variable override available for deployments using
a custom root path.

issue: #51257

## Verification

- `python3 -m py_compile
tests/python_client/milvus_client/test_milvus_client_text_lob.py`
- Targeted pytest node collection completed successfully.
- Verified the committed diff contains only the requested one-line
default change.

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-07-17 21:10:39 +08:00
4fad6e9dbb test: Add TEXT LOB Python client coverage (#50563)
## Summary

- Add Python client TEXT LOB coverage for read/write, lifecycle,
text_match, BM25, compaction, and storage layout checks
- Add bulk import coverage for TEXT LOB payloads across JSON, CSV, and
Parquet via RemoteBulkWriter
- Include a small analyzer-token cache and reduced payload setup to keep
the suite runtime lower

issue: #50562

## Test Plan

- [x] python3 -m py_compile
tests/python_client/milvus_client/test_milvus_client_text_lob.py
tests/python_client/bulk_insert/test_bulk_insert_api.py
- [x] python3 -m pytest -o addopts='' --collect-only -q
tests/python_client/milvus_client/test_milvus_client_text_lob.py
tests/python_client/bulk_insert/test_bulk_insert_api.py::TestBulkInsert::test_text_lob_bulk_import_json_csv_parquet
- [x] Full TEXT LOB Python client file run reported at 95s with 6
workers

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-07-07 12:52:30 +08:00
0bbe4d02a8 test: Add sparse inverted invalid parameter checks (#50775)
issue: #50108

This PR updates sparse inverted index negative coverage to verify the
server rejects invalid build parameters during create_index.

Changes:
- Remove stale xfail markers for invalid sparse inverted index codec and
non-positive block size cases.
- Assert the concrete validation messages for unsupported
inverted_index_codec and block_max_block_size values 0/-1.

Verification:
- python3 -m py_compile
tests/python_client/milvus_client/test_milvus_client_sparse_inverted_index.py
- python3 -m pytest -o "addopts=-p no:locust -v"
tests/python_client/milvus_client/test_milvus_client_sparse_inverted_index.py::TestSparseInvertedIndexV3Negative
-q --host 10.104.18.28 --port 19530

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-06-25 17:10:26 +08:00
fb652661b4 test: add woodpecker chaos test yamls for all chaos categories (#50391)
Fixes #50365

## What changed
- Add Woodpecker Chaos Mesh YAMLs for pod_failure, pod_kill,
network_partition, network_latency, mem_stress, and io_latency.
- Add Woodpecker entries to the corresponding chaos testcases.yaml
files.

## Verification
- git diff --check upstream/master...HEAD
- Woodpecker chaos flow verified working before PR submission.

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-09 16:46:19 +08:00
37a9e00c27 test: Fix sparse negative collection fixture (#50262)
## What this PR does

Splits `TestSparseInvertedIndexV3Negative` into two setup collections so
the fixture no longer exceeds the default `proxy.maxVectorFieldNum=10`
limit:

- the original collection keeps the 10 ordinary sparse vector fields
- a separate BM25 collection holds the 2 BM25 output sparse vector
fields

This lets the negative cases reach their intended `create_index`
validation checks instead of failing during `create_collection` setup.

Fixes #50251
Related: #50108

## Verification

```bash
python3 -m py_compile tests/python_client/milvus_client/test_milvus_client_sparse_inverted_index.py
git diff --check -- tests/python_client/milvus_client/test_milvus_client_sparse_inverted_index.py
pytest -n 6 --dist loadgroup --host 10.104.15.39 --port 19530 ./milvus_client/test_milvus_client_sparse_inverted_index.py::TestSparseInvertedIndexV3Negative
```

Result:

```text
9 passed, 3 xfailed in 10.63s
```

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-06-04 10:16:20 +08:00
455a8d9cac test: add sparse index v3 client coverage and vec index version config (#50105)
## Summary
- add
`tests/python_client/milvus_client/test_milvus_client_sparse_inverted_index.py`
with sparse inverted index v3 Python client coverage
- set `dataCoord.targetVecIndexVersion: 10` in the same 18 e2e/nightly
helm value files aligned with PR #49893 config scope

Fixes #50108

## Test plan
- [ ] run sparse inverted index Python client tests in CI/local
environment
- [ ] validate helm-based e2e/nightly jobs pick up
`dataCoord.targetVecIndexVersion=10`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 14:20:15 +08:00
8985791e1c test: consolidate Python client tests (#49450)
issue: #49202

This PR consolidates Python client tests by moving the remaining
milvus_client_v2 search tests into the main milvus_client suite and
removing the milvus_client_v2 folder.

It also reduces repeated collection/index setup in the data integrity
expression test by looping through expression fields within a single
collection setup.

Verification:
- python3 -m py_compile on touched Python test files
- PYTHONPATH=tests/python_client python3 -m pytest -c /dev/null
--collect-only -q for migrated tests and the refactored data integrity
test

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 15:47:51 +08:00
34fa7d4a51 test: share collections and dedupe cases in milvus_client test suite (#49203)
## Summary

Reduce E2E wall time for the Python `milvus_client` test suite by
introducing module-scoped shared-collection classes for
invalid-parameter and read-only tests, and by removing redundant
alias-invalid test cases. Shareable tests reuse a single collection per
class via a `scope="module"` fixture plus `@pytest.mark.xdist_group`,
eliminating per-test create/insert/drop cycles.

- **`test_milvus_client_query.py`**: new
`TestMilvusClientQueryInvalidShared` absorbs 14 invalid-parameter tests
(27 parametrized cases). 6 tests stay independent — the three
`enable_dynamic_field`-parametrized tests, two state-modifying
partition-load tests, and one test that specifically requires
`enable_dynamic_field=False`.
- **`test_milvus_client_search.py`**: new
`TestMilvusClientSearchInvalidRerankerShared` and
`TestMilvusClientSearchDecayRerankShared` absorb invalid-reranker and
decay-rerank read-only tests.
- **`test_milvus_client_alias.py`**: remove 17 redundant invalid-alias
cases whose coverage overlaps remaining invalid-collection-name /
invalid-alias-name / over-max-length tests.

Runtime impact (measured locally):

| File | Before | After | Change |
|---|---:|---:|---:|
| `test_milvus_client_search.py` | 1134s | 637s | **−44%** |
| `test_milvus_client_query.py`  | 722s  | 621s | **−14%** |

issue: #49202

## Test plan

- [x] L0 + L1 + L2 pass locally for `TestMilvusClientQueryInvalidShared`
- [x] L0 + L1 + L2 pass locally for
`TestMilvusClientSearchInvalidRerankerShared` and
`TestMilvusClientSearchDecayRerankShared`
- [ ] Tests that stayed independent in `TestMilvusClientQueryInvalid`
still pass (the 3 `enable_dynamic_field` variants, 2 partition-load
state tests, `expr_non_constant_array_term`)
- [ ] Remaining `test_milvus_client_alias.py` tests still pass
(invalid-collection-name / alias over-max-length / alter-alias variants)
- [ ] Full suite wall-time delta reproduces in CI

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 18:05:45 +08:00
0d142549a2 test: parallelize go_client testcases via t.Parallel() (#49138)
## Summary

- Add `t.Parallel()` to top-level tests in `tests/go_client/testcases/`
that weren't already parallel. The batch add is function-body aware — it
scans each test's body first and skips any test that already has a
`t.Parallel()` call (e.g. after a leading comment block), so we don't
hit `t.Parallel called multiple times` panics.
- Refactor `TestNullableVectorDifferentIndexTypes` to fan out its 52
sub-cases via a goroutine + semaphore pattern (concurrency=10), matching
the existing idiom in `groupby_search_test.go`.
- `advcases/` tests are intentionally **not** parallelized — per the
go_client README, the `rg`-tagged tests require `-p=1` due to
resource-group global state.

## Local measurements

| Scope | Before | After | Speedup |
|---|---|---|---|
| `TestNullableVectorDifferentIndexTypes` alone | 292s | 40s | ~7× |
| `nullable_default_value_test.go` full file | 849s | 166s | ~5× |

issue: #49135

## Test plan

- [ ] Full `go_client` CI suite runs green on this branch
- [ ] No `t.Parallel called multiple times` panics
- [ ] No race-condition failures from shared state between tests
- [ ] Suite wall-clock time in CI drops meaningfully vs prior baseline

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 14:07:44 +08:00
5eb30fc514 test: fix flaky TTL test by removing Eventually consistency assertion (#48615)
## Summary
- Remove the multi-consistency-level loop in
`test_milvus_client_ttl_default` and use only `Strong` consistency
- Asserting data visibility under `Eventually` consistency is
semantically wrong — it explicitly allows stale (empty) results, causing
persistent flakiness in nightly CI
- The previous fix (PR #48271) added a 15×2s polling loop, but this is
fundamentally insufficient for Eventually consistency after TTL expiry

issue: #48606

## Test plan
- [ ] Verify `test_milvus_client_ttl_default` passes reliably in CI
across all configs (kafka, pulsar-mmap, woodpecker)
- [ ] Confirm no regression in TTL data visibility assertions under
Strong consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:35:36 +08:00
5ea65db873 test: remove xfail for element_filter search after #48617 fix (#48709)
## Summary
- Remove `@pytest.mark.xfail` from
`test_element_filter_with_doc_level_filter` since the underlying bug
(#48617) has been fixed

issue: #48617

## Test plan
- [ ] Verify `test_element_filter_with_doc_level_filter` passes without
xfail marker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:45:36 +08:00
8d167581e5 test: [skip e2e] add nightly woodpecker service mode deployment (#48645)
## Summary
- Add new nightly helm values file `distributed-woodpecker-service` for
woodpecker service mode (non-embedded) deployment
- Add `distributed-woodpecker-service` to Nightly2 Jenkins matrix
- Add release name mapping `dws` in `get_release_name.sh`
- Bump milvus-helm chart version from 5.0.6 to 5.0.16 (supports
woodpecker service mode)

issue: #48644

## Test plan
- [ ] Verify nightly pipeline picks up the new
`distributed-woodpecker-service` deployment option
- [ ] Verify woodpecker service pods start with image
`harbor.milvus.io/woodpecker/woodpecker:master-latest`
- [ ] Verify existing `distributed-woodpecker` (embedded mode) nightly
tests are unaffected
- [ ] Verify `distributed-pulsar-mmap` and `distributed-kafka` nightly
tests pass with chart 5.0.16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:59:36 +08:00
5b54447184 fix: resolve flaky TestSnapshotRestoreWithMultiSegment timeout in CI (#48582)
## Summary
- Use `flushTask.Await()` instead of blind `time.Sleep(10s)` after Flush
to ensure flush completion
- Reduce data volume: `insertBatchSize` 30K→20K, `deleteBatchSize`
10K→5K (total per phase: 150K→100K)
- Fix `teardown()` to also clean collections in the default DB,
preventing resource accumulation across test runs

issue: #48581

## Test plan
- [x] Run `TestSnapshotRestoreWithMultiSegment` against remote Milvus —
PASS
- [x] Run full `TestSnapshot*` suite — teardown successfully cleans all
collections
- [ ] CI validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:33:32 +08:00
ad54157295 test: add entity TTL upsert overwrite test and fix flaky TTL tests (#48271)
## Summary
- Add `test_upsert_overwrite_null_ttl_with_short_ttl` verifying that
upserting NULL TTL with a short TTL correctly expires data across
growing/sealed segments, release/reload, and compaction
- Remove skipped `test_alter_remove_entity_ttl_field` test (blocked by
#47416)
- Fix flaky TTL test cases by adding search retry logic — search and
query take different code paths and TTL filtering propagates at
different speeds, so search assertions need their own polling/retry

issue: #47482, #48260

Signed-off-by: FeilongHou <feilong.hou@zilliz.com>

## Test plan
- [x] New test case passes against a Milvus instance with entity TTL
support
- [x] CI passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:37:32 +08:00
9a691f0745 test: preserve dynamic field and default value during partial update (#48217)
## Summary
- Fix partial update failing when dynamic field is enabled but no
dynamic data is provided during upsert
- Fix partial update failing when field has default value but is not
nullable
- Add E2E test cases covering dynamic field and default value scenarios
for partial update

issue: https://github.com/milvus-io/milvus/issues/47957,
https://github.com/milvus-io/milvus/issues/48002

## Test plan
- [x] Added E2E tests for partial update with dynamic fields
- [x] Added E2E tests for partial update with default value fields
- [x] Verified upsert works with empty dynamic field data
- [x] Verified upsert works with non-nullable fields that have default
values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 19:05:26 +08:00
2f8456c54d test: add entity TTL chaos tests for upsert and insert during node kill (#48057)
## Summary
- Add chaos test for upsert-during-node-kill: verifies TTL extension via
upsert persists after querynode kill and WAL replay
- Add chaos test for insert-during-node-kill: verifies new data with TTL
inserted during chaos is correctly handled after recovery
- Fix `_verify_correctness` to distinguish "service never recovered"
from "wrong counts"
- Strengthen `_verify_search_consistency` to require non-zero valid
results from non-expired groups

## Test plan
- [x] All 5 chaos tests pass against a Milvus cluster with Chaos Mesh
- [x] Upsert test confirms TTL extension survives querynode kill
- [x] Insert test confirms both long-TTL (alive) and short-TTL (expired)
data inserted during chaos are correctly handled after recovery

issue: https://github.com/milvus-io/milvus/issues/47482

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:51:24 +08:00
be76bf709f test: add entity TTL E2E test cases (#47948)
## Summary
- Add comprehensive E2E test cases for the Entity TTL feature (#47482)
- Cover collection creation/alter with `ttl_field`, insert with
future/expired/null TTL values, upsert to extend/shorten TTL, delete
before expiry, release/reload behavior, and query/search filtering of
expired data
- Add invalid parameter test cases: non-timestamptz field, nonexistent
field, nullable=false, and conflict with collection-level TTL
- Fix existing `test_milvus_client_ttl_edge` to properly assert error on
out-of-range TTL

## Test plan
- [x] All new test cases pass against a Milvus instance with entity TTL
support enabled
- [x] Existing TTL test cases remain passing

issue: #47482

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 14:37:22 +08:00
8f282ef7fd fix: partial update default update static field when fields name are the same (#47725)
## Summary
- After schema evolution (adding a static column that previously existed
as a dynamic field in `$meta`), partial update (`upsert` with
`partial_update=True`) fails with: `dynamic field name cannot include
the static field name`
- Root cause: during partial update, `queryPreExecute()` fetches
existing data where `$meta` still contains the old dynamic key. After
merging, `verifyDynamicFieldData()` rejects it because the key now
matches a static field name
- Fix: after the merge step in `queryPreExecute()`, strip any keys from
`$meta` JSON that conflict with current static field names

## Test plan
- [x] Added Go unit test
`TestUpsertTask_queryPreExecute_CleanUpMetaAfterSchemaEvolution`
- [x] Added Python e2e test
`test_milvus_client_partial_update_after_schema_evolution_dynamic_to_static`

issue: #47717

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:46:46 +08:00
dc8a22049e test: add e2e test case for search order by (#47616)
Issue: #47548

 On branch feature/search-order
 Changes to be committed:
	new file:   milvus_client/test_milvus_client_search_order.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 17:22:42 +08:00
6c7373c34d test: restructure timestamptz e2e cases with shared collection (#47670)
## Summary
- Restructure `TestMilvusClientTimestamptz` to use a shared collection
with non-overlapping PK ranges, reducing test setup overhead
- Add query verification to `test_partial_update` to assert timestamps
are correctly updated
- Separate test data into isolated PK slots to prevent cross-test
interference

Issue: #47668

## Test plan
- [x] Run timestamptz e2e tests to verify all cases pass
- [x] Verify partial update test now properly asserts query results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:55:52 +08:00
1c080484e9 test: add e2e case to cover partial update and upsert extending TTL deadline (#47171)
Issue: #47159 
add test case to cover partial update and upsert to extend ttl deadline

 On branch feature/partial-update
 Changes to be committed:
	modified:   milvus_client_v2/test_milvus_client_ttl.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-01-23 15:27:30 +08:00
bf996cb8a0 test: create e2e case for truncate collection (#47035)
Issue: #47034 
 1. Create e2e cases for truncate collection
 2. Connect necessary sdk function to milvus client wrapper

 On branch feature/truncate
 Changes to be committed:
	modified:   base/async_milvus_client_wrapper.py
	modified:   base/client_v2_base.py
	modified:   milvus_client/test_milvus_client_collection.py
	modified:   testcases/async_milvus_client/test_collection_async.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2026-01-19 19:19:29 +08:00
a1721bb47b test: add more test case on partial update (#46628)
Issue: #46627  
add one more test case to cover duplicate pk partial update

 On branch feature/partial-update
 Changes to be committed:
	modified:   milvus_client/test_milvus_client_partial_update.py

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
- Core invariant: upserts with partial_update=True consolidate records
by primary key (PK) rather than creating duplicate rows; this test
verifies the partial-update upsert path preserves PK identity and merge
semantics.
- Change: adds test
test_milvus_client_partial_update_duplicate_pk_partial_update which
inserts duplicate-PK batches, then calls client.upsert(...,
partial_update=True) on a subset of fields and asserts final row count
equals default_nb, exercising the partial-update code path (upsert →
partial update handling → query) not previously covered.
- No production logic removed/simplified: this PR only adds test
coverage (no code paths removed or altered); nothing in production code
is changed or simplified by the PR.
- No data loss or regression introduced: the test validates concrete
code paths — upsert with partial_update True followed by
query(out_fields/with_vec, pk checks) — and asserts deduplication
(2×default_nb → default_nb). Because the PR only adds assertions against
existing behavior and does not modify runtime logic, it cannot cause
data loss or behavioral regressions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-30 16:01:26 +08:00
69a2d202b0 test: cover more timesamptz e2e (#46575)
Issue: #46424  
test:add_collection_field(invalid_default_value)
       hybrid_search(NOT supported_
simplify some test cases using one single collection to save time.
       query with different time shift and timezone settings

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
- Core invariant: TIMESTAMPTZ values are treated as absolute instants
(timezone-preserving). Tests assume conversions between stored instants
and display timezones/time-shifts are deterministic and reversible; the
PR validates queries/reads across different timezone and time-shift
settings against that invariant.

- Removed/simplified logic: duplicated per-test create/insert/teardown
flows and several isolated timestamptz unit cases (edge_case, Feb_29,
partial_update, standalone query) were consolidated into a module-scoped
fixture that creates a single COLLECTION_NAME, inserts ROWS, and handles
teardown. This removes redundant setup/teardown code and repeated
scaffolding while preserving the same API exercise points
(create_collection, insert, query, alter_collection_properties,
alter_database_properties, describe_collection, describe_database).

- No data loss or behavior regression: only test code was reorganized
and new assertions exercise the same production APIs and code paths used
previously (create_collection → insert → query / alter_properties →
describe). The fixture inserts the same ROWS and tests still
convert/compare timestamptz values via cf.convert_timestamptz and query
check routines; the new invalid-default-value test only asserts error
handling when adding a TIMESTAMPTZ field with an invalid default and
does not mutate persisted data or change production logic.

- PR type (Enhancement/Test): expands and reorganizes E2E test coverage
for TIMESTAMPTZ—centralizes collection setup to reduce runtime and
flakiness, adds explicit coverage for invalid-default-value behavior,
and increases timezone/time-shift query scenarios without altering
product behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-30 15:59:21 +08:00
e4b0f48bc0 test: add e2e test cases for highlighter (#46505)
### **User description**
Issue: #46504 
test: create e2e test case for highlighter

 On branch feature/highlighter
 Changes to be committed:
	new file:   milvus_client/test_milvus_client_highlighter.py


___

### **PR Type**
Tests


___

### **Description**
- Add comprehensive e2e test suite for LexicalHighlighter functionality

- Test highlighter initialization with collection setup and data
insertion

- Validate highlighter with various parameters (tags, fragments,
offsets)

- Test edge cases including Chinese characters, long text, and invalid
inputs

- Verify error handling for invalid fragment sizes, offsets, and
configurations


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Test Suite Setup"] --> B["Highlighter Init Tests"]
  B --> C["Valid Test Cases"]
  C --> D["Fragment Parameters"]
  C --> E["Search Variations"]
  C --> F["Language Support"]
  B --> G["Invalid Test Cases"]
  G --> H["Parameter Validation"]
  G --> I["Error Handling"]
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>test_milvus_client_highlighter.py</strong><dd><code>Add
comprehensive LexicalHighlighter e2e test suite</code>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/python_client/milvus_client/test_milvus_client_highlighter.py

<ul><li>Create new test file with 1163 lines of comprehensive
highlighter test <br>cases<br> <li> Implement
<code>TestMilvusClientHighlighterInit</code> class to initialize
<br>collection with pre-defined test data including English, Chinese,
and <br>long text samples<br> <li> Implement
<code>TestMilvusClientHighlighterValid</code> class with 15+ test
methods <br>covering basic usage, multiple tags, fragment parameters,
offsets, <br>numbers, sentences, and language support<br> <li> Implement
<code>TestMilvusClientHighlighterInvalid</code> class with 8+ test
<br>methods validating error handling for invalid parameters and
<br>configurations<br> <li> Test highlighter with BM25 search, text
matching, and various analyzer <br>configurations</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46505/files#diff-443e3fefb65fbdb088d5920083306ecfe3605745b1e2714198c6566ca67b3736">+1163/-0</a></td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
  * Added a comprehensive highlighter test suite covering:
- Core highlighting with single and multi-analyzer setups and multi-tag
variations
    - Fragment parameter behaviors and edge cases (size, offset, count)
- Text-match and query-based highlighting, including BM25 and vector
interactions
- Sub-word, long-text/tag, case sensitivity, Chinese/multi-language
scenarios
- Error handling for invalid parameters, no-match cases, and other edge
conditions
- Module-scoped fixture preparing multilingual, long-form test data and
teardown

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-24 09:49:19 +08:00
a7eb327746 test: fix unstable timestamptz test cases (#46403)
Issue: #46333 

test: re-write convert timestamp logic to cover daylight saving time

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-17 21:13:16 +08:00
971085b033 test: enable debug_mode to observe test case instability. (#46341)
Issue: #46333

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-15 17:55:16 +08:00
224a7943ad test: add e2e case for timestamptz on restful (#46254)
Issue: #46253

 On branch feature/timestamps
 Changes to be committed:
	new file:   testcases/test_timestamptz.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-11 14:21:13 +08:00
624147740b test: fix timestamptz e2e case failure on Jenkins Weekly (#46210)
Issue: #46188 

Bug was caused by inconsistent version of tzdata as well as wrong month
assignment in convert_timestamptz function.
Also fix when debug_mode=True the compare function can correctly return
True or False.

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-09 16:09:15 +08:00
dd3797f3ac test: add timestamptz to more bulk writer case (#46016)
Issue #46015
 <test>: <add timestamptz to more bulk writer>

 On branch feature/timestamps
 Changes to be committed:
	modified:   testcases/test_bulk_insert.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-12-03 10:05:10 +08:00
228eb0f5d0 test: add more test cases and add bulk insert scenario (#45770)
Issue: #45756 
1. add bulk insert scenario
 2. fix small issue in e2e cases
 3. add search group by test case
 4. add timestampstz to gen_all_datatype_collection_schema
5. modify partial update testcase to ensure correct result from
timestamptz field

 On branch feature/timestamps
 Changes to be committed:
	modified:   common/bulk_insert_data.py
	modified:   common/common_func.py
	modified:   common/common_type.py
	modified:   milvus_client/test_milvus_client_partial_update.py
	modified:   milvus_client/test_milvus_client_timestamptz.py
	modified:   pytest.ini
	modified:   testcases/test_bulk_insert.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-24 15:21:06 +08:00
0231a3edf8 test: enable all timestamptz case (#45128)
Issue: #44518

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-21 11:03:06 +08:00
db42b2df75 test: fix partial update chaos checker (#45492)
Issue: #45489 
<fix>: <fix partial update chaos checker>

 On branch feature/partial-update
 Changes to be committed:
	modified:   chaos/checker.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-13 17:29:37 +08:00
9e4975bdfa test: added test case for partial update on duplicate pk (#45130)
Issue: #45129
 <test>: <add new test case>
 <also delete duplicate test case>

 On branch feature/partial-update
 Changes to be committed:
	modified:   milvus_client/test_milvus_client_partial_update.py
	modified:   milvus_client/test_milvus_client_upsert.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-11-04 15:47:32 +08:00
7aa56e1fb6 test: change test_milvus_client_search_json_path_index_all_expressions to L1 (#44986)
Issue: #44989 
On branch feature/json-shredding
Changes to be committed:
modified: milvus_client/test_milvus_client_query.py

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-10-23 16:14:05 +08:00
16ff5db79d test: Add e2e case for timestamptz (currently skipping them) (#44871)
Issue: #44518

On branch feature/timestamps
Changes to be committed:
    modified: common/common_func.py
    new file: milvus_client/test_milvus_client_timestamptz.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-10-20 10:04:02 +08:00
f9afde23d1 test: Add New Test Cases for Partial Update (#44483)
Issue: #43872 
<fix>: <fix after accidental force pull>

 Changes to be committed:
	modified:   chaos/checker.py
	modified:   chaos/testcases/test_single_request_operation.py
	modified:   common/common_func.py
	modified:   common/common_type.py
	modified:   milvus_client/test_milvus_client_insert.py

This includes e2e cases and chaos checker.
All the cases are currently skipped due to partial update feature not
ready.

1. test_milvus_client_partial_update_insert_delete_upsert_with_flush():
insert -> delete -> flush -> query -> upsert -> flush -> query
2.
test_milvus_client_partial_update_insert_upsert_delete_upsert_flush():
insert -> upsert -> delete -> upsert -> flush -> query
3.
test_milvus_client_partial_update_insert_upsert_flush_delete_upsert_flush():
insert -> upsert -> flush -> delete -> upsert -> flush -> query Also
update requirements.txt to use latest pymilvus version

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-09-23 09:06:12 +08:00
6884cdbe90 test: add complex json expression test (#44211)
<test>: <add test case for complex json expression

 On branch feature/json-shredding
 Changes to be committed:
       modified:   milvus_client/expressions/README.md
modified:
milvus_client/expressions/test_milvus_client_scalar_filtering.py

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-09-11 19:57:58 +08:00
9f9ed14ddb test: migrated all test cases in test_alias.py to test_milvus_client_alias.py (#43834)
Issue: #43793 
Finished migrate all test cases in test_alias.py. Locally tested and
verified.

---------

Signed-off-by: Eric Hou <eric.hou@zilliz.com>
Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-08-13 19:23:43 +08:00
1a712aa13b test: migrate test case from test_alias to test_milvus_client_alias (#43802)
issue: [#43793](https://github.com/milvus-io/milvus/issues/43793)

- migrate test_alias_create_operation_default() to
test_milvus_client_alias_create_operation_default()

Co-authored-by: Eric Hou <eric.hou@zilliz.com>
2025-08-08 18:29:41 +08:00