Skip to content

Commit

Permalink
swap assertion arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-gwozdz committed Jun 7, 2023
1 parent e62ba20 commit 95cd94f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contrib/ruby/test/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def test_packet_size_lower_than_trilogy_max_packet_len
client.query query_for_target_packet_size(4 * 1024 * 1024 + 1)
end

assert_equal exception.message, "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED"
assert_equal "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED", exception.message
ensure
ensure_closed client
end
Expand All @@ -794,7 +794,7 @@ def test_packet_size_greater_than_trilogy_max_packet_len
client.query query_for_target_packet_size(32 * 1024 * 1024 + 1)
end

assert_equal exception.message, "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED"
assert_equal "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED", exception.message
ensure
ensure_closed client
end
Expand All @@ -812,7 +812,7 @@ def test_configured_max_packet_below_server
client.query query_for_target_packet_size(24 * 1024 * 1024 + 1)
end

assert_equal exception.message, "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED"
assert_equal "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED", exception.message
ensure
ensure_closed client
end
Expand All @@ -830,13 +830,13 @@ def test_configured_max_packet_above_server
client.query query_for_target_packet_size(32 * 1024 * 1024 + 1)
end

assert_equal exception.message, "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED"
assert_equal "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED", exception.message

exception = assert_raises Trilogy::QueryError do
client.query query_for_target_packet_size(24 * 1024 * 1024 + 1)
end

refute_match exception.message, /TRILOGY_MAX_PACKET_EXCEEDED/
refute_match /TRILOGY_MAX_PACKET_EXCEEDED/, exception.message
ensure
ensure_closed client
end
Expand All @@ -854,7 +854,7 @@ def test_absolute_maximum_packet_size
client.query query_for_target_packet_size(1024 * 1024 * 1024 + 1)
end

assert_equal exception.message, "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED"
assert_equal "trilogy_query_send: TRILOGY_MAX_PACKET_EXCEEDED", exception.message
ensure
ensure_closed client
end
Expand Down

0 comments on commit 95cd94f

Please sign in to comment.