Skip to content

Commit

Permalink
Merge pull request #896 from supercaracal/fix-a-unstable-test-case
Browse files Browse the repository at this point in the history
Fix unstable test cases
  • Loading branch information
byroot committed Mar 30, 2020
2 parents 7127f3b + a165deb commit 45666da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions test/distributed_remote_server_control_commands_test.rb
Expand Up @@ -28,11 +28,13 @@ def test_info

def test_info_commandstats
target_version "2.5.7" do
r.nodes.each { |n| n.config(:resetstat) }
r.ping # Executed on every node
r.nodes.each do |n|
n.config(:resetstat)
n.config(:get, :port)
end

r.info(:commandstats).each do |info|
assert_equal "1", info["ping"]["calls"]
assert_equal '2', info['config']['calls'] # CONFIG RESETSTAT + CONFIG GET = twice
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/remote_server_control_commands_test.rb
Expand Up @@ -27,10 +27,10 @@ def test_info
def test_info_commandstats
target_version "2.5.7" do
r.config(:resetstat)
r.ping
r.config(:get, :port)

result = r.info(:commandstats)
assert_equal "1", result["ping"]["calls"]
assert_equal '2', result['config']['calls']
end
end

Expand Down

0 comments on commit 45666da

Please sign in to comment.