Skip to content

Commit becfa8e

Browse files
committed
test(data_plane): bias vectors away from zero in async_req fanout test
## Purpose Backend tightened zero-vector validation — dense vectors with all-zero values now return HTTP 400. The test generated `[0.0, 0.0]` for i=0, causing CI failures in test_async_req_concurrent_fanout_rest. ## Solution Changed both `[i * 0.1, i * 0.2]` expressions to `[(i + 1) * 0.1, (i + 1) * 0.2]` so no vector in the range is all-zero. The 8 distinct vectors remain orthogonal-ish; only the all-zero edge case is avoided.
1 parent 2a156bb commit becfa8e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/integration/test_data_plane.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,9 @@ def test_async_req_concurrent_fanout_rest(client_pool: Pinecone, shared_index_di
18621862
ns = f"ns-{uuid.uuid4().hex[:8]}"
18631863
with client_pool.index(name=shared_index_dim2) as index:
18641864
index.upsert(
1865-
vectors=[{"id": f"con-v{i}", "values": [i * 0.1, i * 0.2]} for i in range(8)],
1865+
vectors=[
1866+
{"id": f"con-v{i}", "values": [(i + 1) * 0.1, (i + 1) * 0.2]} for i in range(8)
1867+
],
18661868
namespace=ns,
18671869
)
18681870
poll_until(
@@ -1875,7 +1877,9 @@ def test_async_req_concurrent_fanout_rest(client_pool: Pinecone, shared_index_di
18751877
# Fan out 4 simultaneous queries. With pool_threads=4, all
18761878
# four should be in flight at once.
18771879
results: list[Any] = [
1878-
index.query(top_k=2, vector=[i * 0.1, i * 0.2], namespace=ns, async_req=True) # type: ignore[call-arg]
1880+
index.query(
1881+
top_k=2, vector=[(i + 1) * 0.1, (i + 1) * 0.2], namespace=ns, async_req=True
1882+
) # type: ignore[call-arg]
18791883
for i in range(4)
18801884
]
18811885
for r in results:

0 commit comments

Comments
 (0)