From 5ab6974527b7f40b3d84bb2940ceb6cc4e327992 Mon Sep 17 00:00:00 2001 From: mdumandag Date: Thu, 26 Nov 2020 17:17:57 +0300 Subject: [PATCH] Avoid possible race on BackupAcksTest It might be the case that the replica node could not finish its partition table initialization when it receives the backup operation request from the primary node. That can cause the backup request to be dropped which can result in test failure since there won't be any backup acks from the replica node. This won't be needed when the https://github.com/hazelcast/hazelcast/issues/9398 is fixed. Until then, a call like `map.get(1)` should be enough as a workaround. See Also: https://github.com/hazelcast/hazelcast-nodejs-client/pull/693 --- tests/backup_acks_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/backup_acks_test.py b/tests/backup_acks_test.py index c18c3cfe57..f2c9af4aa5 100644 --- a/tests/backup_acks_test.py +++ b/tests/backup_acks_test.py @@ -30,10 +30,14 @@ def test_smart_mode(self): cluster_name=self.cluster.id, fail_on_indeterminate_operation_state=True, ) - m = self.client.get_map("test") + m = self.client.get_map("test").blocking() + + # TODO: Remove the next line once + # https://github.com/hazelcast/hazelcast/issues/9398 is fixed + m.get(1) # it's enough for this operation to succeed - m.set(1, 2).result() + m.set(1, 2) def test_lost_backups_on_smart_mode_with_fail_on_indeterminate_operation_state(self): self.client = HazelcastClient(