-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding tests for file cache statistics response
Addming missing tests for file caches in NodeStats FsInfo. This commit changes the test value for `cache_utilized` field. Going forward both file cache fields are present in the node stats REST response. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
- Loading branch information
1 parent
4349023
commit 29a9ba3
Showing
8 changed files
with
136 additions
and
39 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/70_file_cache.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# As of now only nodes with the "search" role can utilize file caching. | ||
# Moreover, until the remote store is used in the test and some searches executed (which will force | ||
# downloading the files from remote store to node file cache) we should always expect 0b size. | ||
# But at least the cache file fields must be present. | ||
--- | ||
"File Cache stats": | ||
- skip: | ||
version: " - 2.15.99" | ||
reason: "file cache fields were added in 2.7 but #13232 was not back-ported yet" | ||
features: [arbitrary_key] | ||
|
||
- do: | ||
nodes.info: {} | ||
- set: | ||
nodes._arbitrary_key_: node_id | ||
|
||
- do: | ||
nodes.stats: | ||
metric: [ fs ] | ||
|
||
# In the future we shall test that the node has a "search" role | ||
# otherwise the file cache will be always 0. | ||
- is_true: nodes.$node_id.roles | ||
|
||
- is_true: nodes.$node_id.fs.total | ||
- gte: { nodes.$node_id.fs.total.cache_reserved_in_bytes: 0 } | ||
- gte: { nodes.$node_id.fs.total.cache_utilized_in_bytes: 0 } | ||
|
||
- is_true: nodes.$node_id.fs.data | ||
- gte: { nodes.$node_id.fs.data.0.cache_reserved_in_bytes: 0 } | ||
- gte: { nodes.$node_id.fs.data.0.cache_utilized_in_bytes: 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters