This is an automated email from the ASF dual-hosted git repository.
hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new db9d16f8 refactor(server): add segment cache index variants to server
restart test (#1900)
db9d16f8 is described below
commit db9d16f8a2a061f9e9e22a97d6120695da989855
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Sun Jun 22 14:51:41 2025 +0200
refactor(server): add segment cache index variants to server restart test
(#1900)
Refactor data integrity test to verify server restart behavior with
different IGGY_SYSTEM_SEGMENT_CACHE_INDEXES settings. The test now
validates three cache configurations: 'open_segment', 'all', and
'none' to ensure data persistence works correctly regardless of the
index caching strategy.
---
core/integration/tests/server/tcp_server.rs | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/core/integration/tests/server/tcp_server.rs
b/core/integration/tests/server/tcp_server.rs
index ec8b3c34..550d98c6 100644
--- a/core/integration/tests/server/tcp_server.rs
+++ b/core/integration/tests/server/tcp_server.rs
@@ -168,7 +168,23 @@ async fn should_delete_segments_via_tcp_binary_protocol() {
#[tokio::test]
#[parallel]
-async fn should_verify_data_integrity_after_server_restart() {
+async fn
should_verify_data_integrity_after_server_restart_with_open_segment_index_cache()
{
+
verify_data_integrity_after_server_restart_with_cache_setting("open_segment").await;
+}
+
+#[tokio::test]
+#[parallel]
+async fn
should_verify_data_integrity_after_server_restart_with_all_index_cache() {
+ verify_data_integrity_after_server_restart_with_cache_setting("all").await;
+}
+
+#[tokio::test]
+#[parallel]
+async fn
should_verify_data_integrity_after_server_restart_with_no_index_cache() {
+
verify_data_integrity_after_server_restart_with_cache_setting("none").await;
+}
+
+async fn
verify_data_integrity_after_server_restart_with_cache_setting(cache_setting:
&str) {
let data_dir = format!("local_data_restart_test_{}",
uuid::Uuid::new_v4().simple());
let mut extra_env = HashMap::new();
@@ -176,7 +192,7 @@ async fn
should_verify_data_integrity_after_server_restart() {
extra_env.insert("IGGY_SYSTEM_PATH".to_string(), data_dir.clone());
extra_env.insert(
"IGGY_SYSTEM_SEGMENT_CACHE_INDEXES".to_string(),
- "open_segment".to_string(),
+ cache_setting.to_string(),
);
let mut test_server = TestServer::new(Some(extra_env.clone()), false,
None, IpAddrKind::V4);