From 91b087aa58be6fb3bfeafe4d846fa4038101475b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 17 Aug 2022 15:06:42 +0200 Subject: [PATCH] Stabilize the cluster suite --- test/cluster/commands_on_cluster_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/cluster/commands_on_cluster_test.rb b/test/cluster/commands_on_cluster_test.rb index 5f2462ca8..a6fea1bbd 100644 --- a/test/cluster/commands_on_cluster_test.rb +++ b/test/cluster/commands_on_cluster_test.rb @@ -138,9 +138,11 @@ def test_cluster_slots assert_equal true, sample_slot.fetch('master').key?('node_id') assert_equal true, sample_slot.key?('replicas') assert_equal true, sample_slot.fetch('replicas').is_a?(Array) - assert_equal true, sample_slot.fetch('replicas').first.key?('ip') - assert_equal true, sample_slot.fetch('replicas').first.key?('port') - assert_equal true, sample_slot.fetch('replicas').first.key?('node_id') + sample_slot.fetch('replicas').each do |replica| + assert_equal true, replica.key?('ip') + assert_equal true, replica.key?('port') + assert_equal true, replica.key?('node_id') + end end def test_readonly