Skip to content

Commit

Permalink
Refactor index refresh logic
Browse files Browse the repository at this point in the history
Instead of refreshing all indices, which could lead to a warning when a system index is refreshed and cause the test to fail due to the unexpected warning, I modified the logic to refresh only the required 'test' index.

Signed-off-by: rithin-pullela-aws <[email protected]>
  • Loading branch information
rithin-pullela-aws authored and ylwu-amzn committed Feb 5, 2025
1 parent a826d70 commit 40e6e8c
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ setup:
id: 2
body: { "field1": "v1 aoeu", "field2": " ua u v2", "field3": "foo bar text", "user_rating": 0.0 }

- do:
indices.refresh: { test }

- do:
allowed_warnings:
- "this request accesses system indices: [.ltrstore], but in a future major version, direct access to system indices will be prevented by default"
Expand Down Expand Up @@ -67,11 +70,6 @@ setup:

# Model only uses a single feature... although feature set has multiple

- do:
allowed_warnings:
- "this request accesses system indices: [.plugins-ml-config], but in a future major version, direct access to system indices will be prevented by default"
indices.refresh: {}

- do:
allowed_warnings:
- "this request accesses system indices: [.ltrstore], but in a future major version, direct access to system indices will be prevented by default"
Expand Down Expand Up @@ -135,11 +133,6 @@ setup:
feature2: 2.3
no_param_feature: 3.0

- do:
allowed_warnings:
- "this request accesses system indices: [.plugins-ml-config], but in a future major version, direct access to system indices will be prevented by default"
indices.refresh: {}

---
"single feature ranklib model":
- skip:
Expand Down

0 comments on commit 40e6e8c

Please sign in to comment.