From dbfc53627d31524ddaa980b33a5826864fe5ee2e Mon Sep 17 00:00:00 2001 From: ihsan Date: Mon, 4 May 2026 17:11:27 +0300 Subject: [PATCH 1/3] refactor: - Opened "ClientMapTest::test*Ttl* tests" [HZ-5311] - Enhanced ClientMapTest to use structured client configuration parameters. fixes #1390 --- hazelcast/test/src/HazelcastTests5.cpp | 57 ++++++++------------------ 1 file changed, 17 insertions(+), 40 deletions(-) diff --git a/hazelcast/test/src/HazelcastTests5.cpp b/hazelcast/test/src/HazelcastTests5.cpp index b99d1c34f1..1e4d59c143 100644 --- a/hazelcast/test/src/HazelcastTests5.cpp +++ b/hazelcast/test/src/HazelcastTests5.cpp @@ -738,9 +738,15 @@ class PartitionAwareInt : public partition_aware int actual_key_; }; +struct client_config_param +{ + std::string name; + std::function factory; +}; + class ClientMapTest : public ClientTest - , public ::testing::WithParamInterface> + , public ::testing::WithParamInterface { public: static constexpr const char* intMapName = "IntMap"; @@ -787,7 +793,7 @@ class ClientMapTest } ClientMapTest() - : client_(new_client(GetParam()()).get()) + : client_(new_client(GetParam().factory()).get()) , imap_(client_.get_map(imapName).get()) , int_map_(client_.get_map(intMapName).get()) , employees_(client_.get_map(employeesMapName).get()) @@ -951,9 +957,15 @@ INSTANTIATE_TEST_SUITE_P( ClientMapTestWithDifferentConfigs, ClientMapTest, ::testing::Values( - ClientMapTest::create_map_client_config, - ClientMapTest::create_near_cached_map_client_config, - ClientMapTest::create_near_cached_object_map_client_config)); + client_config_param{ "Default", &ClientMapTest::create_map_client_config }, + client_config_param{ "NearCachedBinary", + &ClientMapTest::create_near_cached_map_client_config }, + client_config_param{ + "NearCachedObject", + &ClientMapTest::create_near_cached_object_map_client_config }), + [](const ::testing::TestParamInfo& info) { + return info.param.name; + }); TEST_P(ClientMapTest, testIssue537) { @@ -1172,13 +1184,6 @@ TEST_P(ClientMapTest, testTryPutRemove) TEST_P(ClientMapTest, testPutTtl) { - if (client_.get_client_config().get_near_cache_config(imap_->get_name()) != - nullptr) { - GTEST_SKIP_( - "Server side expiry does not send near cache invalidations. " - "See https://github.com/hazelcast/hazelcast/issues/10975"); - } - validate_expiry_invalidations(imap_, [=]() { imap_ ->put( @@ -1189,13 +1194,6 @@ TEST_P(ClientMapTest, testPutTtl) TEST_P(ClientMapTest, testPutConfigTtl) { - if (client_.get_client_config().get_near_cache_config( - ONE_SECOND_MAP_NAME) != nullptr) { - GTEST_SKIP_( - "Server side expiry does not send near cache invalidations. " - "See https://github.com/hazelcast/hazelcast/issues/10975"); - } - std::shared_ptr map = client_.get_map(ONE_SECOND_MAP_NAME).get(); validate_expiry_invalidations(map, [=]() { map->put("key1", "value1").get(); @@ -1215,13 +1213,6 @@ TEST_P(ClientMapTest, testPutIfAbsent) TEST_P(ClientMapTest, testPutIfAbsentTtl) { - if (client_.get_client_config().get_near_cache_config(imap_->get_name()) != - nullptr) { - GTEST_SKIP_( - "Server side expiry does not send near cache invalidations. " - "See https://github.com/hazelcast/hazelcast/issues/10975"); - } - ASSERT_FALSE((imap_ ->put_if_absent( "key1", "value1", std::chrono::seconds(10)) @@ -1264,13 +1255,6 @@ TEST_P(ClientMapTest, testSet) TEST_P(ClientMapTest, testSetTtl) { - if (client_.get_client_config().get_near_cache_config(imap_->get_name()) != - nullptr) { - GTEST_SKIP_( - "Server side expiry does not send near cache invalidations. " - "See https://github.com/hazelcast/hazelcast/issues/10975"); - } - validate_expiry_invalidations(imap_, [=]() { imap_->set("key1", "value1", std::chrono::seconds(1)).get(); }); @@ -1278,13 +1262,6 @@ TEST_P(ClientMapTest, testSetTtl) TEST_P(ClientMapTest, testSetConfigTtl) { - if (client_.get_client_config().get_near_cache_config( - ONE_SECOND_MAP_NAME) != nullptr) { - GTEST_SKIP_( - "Server side expiry does not send near cache invalidations. " - "See https://github.com/hazelcast/hazelcast/issues/10975"); - } - std::shared_ptr map = client_.get_map(ONE_SECOND_MAP_NAME).get(); validate_expiry_invalidations(map, [=]() { map->set("key1", "value1").get(); }); From 301f0b6176b616e0f58bd80653131dc2b76794b2 Mon Sep 17 00:00:00 2001 From: ihsan Date: Mon, 4 May 2026 17:12:56 +0300 Subject: [PATCH 2/3] bump: update HZ_VERSION to 5.7.0-SNAPSHOT in start-rc.bat and start-rc.sh --- scripts/start-rc.bat | 2 +- scripts/start-rc.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-rc.bat b/scripts/start-rc.bat index 82ffaca03f..fc824da1d1 100755 --- a/scripts/start-rc.bat +++ b/scripts/start-rc.bat @@ -2,7 +2,7 @@ setlocal EnableDelayedExpansion if "%HZ_VERSION%"=="" ( - set HZ_VERSION=5.6.0 + set HZ_VERSION=5.7.0-SNAPSHOT ) set HAZELCAST_TEST_VERSION=%HZ_VERSION% set HAZELCAST_ENTERPRISE_VERSION=%HZ_VERSION% diff --git a/scripts/start-rc.sh b/scripts/start-rc.sh index 486e023dca..c47eec883c 100755 --- a/scripts/start-rc.sh +++ b/scripts/start-rc.sh @@ -34,7 +34,7 @@ set +x trap cleanup EXIT -HZ_VERSION=${HZ_VERSION:-5.6.0} +HZ_VERSION=${HZ_VERSION:-5.7.0-SNAPSHOT} HAZELCAST_TEST_VERSION=${HZ_VERSION} HAZELCAST_ENTERPRISE_VERSION=${HZ_VERSION} HAZELCAST_RC_VERSION=0.8-SNAPSHOT From fcbe3295da223c4a3a8f72c5114eebe7e710a696 Mon Sep 17 00:00:00 2001 From: ihsan Date: Tue, 5 May 2026 09:41:23 +0300 Subject: [PATCH 3/3] Review comment fix. --- .github/config.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/config.env b/.github/config.env index 2e020b298b..94a4420f5a 100644 --- a/.github/config.env +++ b/.github/config.env @@ -1,4 +1,4 @@ JAVA_VERSION=17 JAVA_DISTRIBUTION=temurin MAVEN_VERSION=3.9.11 -HZ_VERSION=5.6.0 +HZ_VERSION=5.7.0-SNAPSHOT