Skip to content

test: fix flaky timeDecay, users, backup and WCD journey tests - #486

Open
dudanogueira wants to merge 3 commits into
weaviate:weaviate-clientfrom
dudanogueira:fix/flaky-ci-tests
Open

dudanogueira wants to merge 3 commits into
weaviate:weaviate-clientfrom
dudanogueira:fix/flaky-ci-tests

Conversation

@dudanogueira

@dudanogueira dudanogueira commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #485. Retargeted from main to weaviate-client: after the packages/ restructure (#307), the old test/ layout and the 3.x releases live on this branch, and its CI still fails on these tests (for example the v3.15.2/v3.15.3 runs on 27 and 29 Oct). #496 ports the two fixes that still apply to main.

timeDecay boost test (test/collections/query/integration.test.ts)

All objects were inserted with createdAt: Date.now(), while the decay origin is 2024-01-01 with a 35d scale. Every object's decay was therefore effectively zero and identical, so the boost did nothing, and not.toEqual(baseline) only passed when float noise reordered ties. createdAt is now spread around the origin (origin, +30d, +1y), so the object at the origin (red, which ranks last on vector distance alone) gets a real boost.

WCD journey test (test/collections/journey.test.ts)

It runs against a shared WCD cluster, not the version-matrix container. replication.asyncEnabled is that cluster's server default, which already flipped once (it was pinned to true in #494 after failing as false). The test now accepts any boolean instead of pinning the current default.

users (test/users/integration.test.ts)

beforeAll fired roles.delete / roles.create without awaiting them, so the role-assignment tests could run before the test role existed.

backup (test/backup/journey.test.ts)

Before 1.38.10 the server could briefly report a failed restore as FAILED with no error (weaviate/weaviate 895cd4d409), so asserting on the error message was flaky. The suite now runs only on >= 1.38.10.

Dropped from the original PR

Testing

tsc, eslint and prettier pass. The boost suite passed 3 out of 3 runs locally against Weaviate 1.38.2.

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@dudanogueira
dudanogueira requested a review from a team as a code owner October 5, 2026 14:14
@dudanogueira dudanogueira changed the title test: fix journey replication assertion and flaky timeDecay boost test test: fix flaky CI tests and test against Weaviate 1.39 Oct 5, 2026
The delete and create calls were fired without awaiting, so beforeAll could
resolve before the 'test' role existed, or the delete could land after the
create. assignRoles/revokeRoles then failed with 404 'role doesn't exist'.
…st deterministic

The journey test runs against a shared WCD cluster whose default for
replication.asyncEnabled flipped to true, breaking every tests-without-auth
job. That value is owned by the cluster config, so accept any boolean.

The timeDecay boost test inserted all objects at Date.now() while decaying
from 2024-01-01 over 35d, so every object's boost was ~0 and identical and
the assertion only passed when float noise reordered ties. Spread createdAt
around the origin so the boost reorders results deterministically.

Fixes weaviate#485
@dudanogueira
dudanogueira changed the base branch from main to weaviate-client October 30, 2026 09:01

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@dudanogueira dudanogueira changed the title test: fix flaky CI tests and test against Weaviate 1.39 test: fix flaky timeDecay, users, backup and WCD journey tests Oct 30, 2026

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 1   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca
🛡️ The following SAST misconfigurations have been detected
NAME FILE
low GitHub Actions Workflow or Action Missing Top-Level Name .../workflows/main.yaml View in code

Before 1.38.10 a poll could read a failed restore as FAILED with no error
(fixed upstream in weaviate/weaviate 895cd4d409), so the error-message
assertion flaked. 1.33-1.37 have no backport.

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: journey test asserts WCD cluster's replication default; timeDecay boost test is flaky

1 participant