Skip to content

Commit 45666da

Browse files
authored
Merge pull request #896 from supercaracal/fix-a-unstable-test-case
Fix unstable test cases
2 parents 7127f3b + a165deb commit 45666da

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/distributed_remote_server_control_commands_test.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ def test_info
2828

2929
def test_info_commandstats
3030
target_version "2.5.7" do
31-
r.nodes.each { |n| n.config(:resetstat) }
32-
r.ping # Executed on every node
31+
r.nodes.each do |n|
32+
n.config(:resetstat)
33+
n.config(:get, :port)
34+
end
3335

3436
r.info(:commandstats).each do |info|
35-
assert_equal "1", info["ping"]["calls"]
37+
assert_equal '2', info['config']['calls'] # CONFIG RESETSTAT + CONFIG GET = twice
3638
end
3739
end
3840
end

test/remote_server_control_commands_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def test_info
2727
def test_info_commandstats
2828
target_version "2.5.7" do
2929
r.config(:resetstat)
30-
r.ping
30+
r.config(:get, :port)
3131

3232
result = r.info(:commandstats)
33-
assert_equal "1", result["ping"]["calls"]
33+
assert_equal '2', result['config']['calls']
3434
end
3535
end
3636

0 commit comments

Comments
 (0)