Skip to content

Conversation

@ihsandemir
Copy link
Collaborator

@ihsandemir ihsandemir commented Dec 30, 2025

Disabled ttl based tests for near cache based test cases due to an issue at server side hazelcast/hazelcast#10975

Fixed ClientMapTest.testPutIfAbsentTtl so that it is in sync with Java test https://github.com/hazelcast/hazelcast-mono/blob/aad45696a4bb784c6a538e22d26f183973ace9c4/hazelcast/hazelcast/src/test/java/com/hazelcast/client/map/ClientMapTest.java#L542. The problem was that we dependent on timing on the entry expiry and 1 second may not be enough in busy times. Hence, it is changed to 10 seconds. We also re-put the entry with 10 seconds ttl in the send put also to avoid expiry when we checked the value in the next step.

opened #1390 so that we do not forget to re-open these tests.

fixes #1145
fixes #1181

@ihsandemir ihsandemir added this to the 5.6.0 milestone Dec 30, 2025
@ihsandemir ihsandemir self-assigned this Dec 30, 2025
Comment on lines +1219 to +1244
ASSERT_FALSE((imap_
->put_if_absent<std::string, std::string>(
"key1", "value3", std::chrono::seconds(10))
.get()
.has_value()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this get reformatted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line changed and used clang-format to format. do you mean the indentation of the lines?

Copy link
Contributor

Choose a reason for hiding this comment

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

do you mean the indentation of the lines?

Yes.

The codebase should have a consistent format now so this shouldn't have needed to change. If it did, then there must be a tooling difference between our respective clang-formats?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh it changed. From ASSERT_FALSE -> ASSERT_FALSE_EVENTUALLY. Ignore me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I dislike the magic 10 but as you've highlighted, it already exists in hazelcast.

…a test https://github.com/hazelcast/hazelcast-mono/blob/aad45696a4bb784c6a538e22d26f183973ace9c4/hazelcast/hazelcast/src/test/java/com/hazelcast/client/map/ClientMapTest.java#L542.

The problem was that we dependent on timing on the entry expiry and 1 second may not be enough in busy times. Hence, it is changed to 10 seconds. We also re-put the entry with 10 seconds ttl in the send put also to avoid expiry when we checked the value in the next step.

fixes hazelcast#1145
@ihsandemir ihsandemir changed the title Fixed ClientMapTest.testPutIfAbsentTtl so that it is in sync with Java test [HZ-5308] Disable ttl based tests in ClientMapTest suite for near cache client [HZ-5308] Jan 7, 2026
@ihsandemir ihsandemir changed the title Disable ttl based tests in ClientMapTest suite for near cache client [HZ-5308] Disable ttl based tests in ClientMapTest suite for near cache client [HZ-5308] [HZ-5310] Jan 7, 2026
@ihsandemir ihsandemir merged commit 2aa16dd into hazelcast:master Jan 7, 2026
31 checks passed
@ihsandemir ihsandemir deleted the testPutWithTtlTestFix branch January 7, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants