Skip to content

Commit

Permalink
Have test_connection_error test user account with wrong password
Browse files Browse the repository at this point in the history
This test was being skipped for reasons described in
trilogy-libraries#43.
Instead of testing for a connection error by using a nonexistent user,
we can use an existing user with the wrong password. This appears to avoid
the authentication plugin flakiness, while still executing the code path we
care about related to an "Access denied" connection error.
  • Loading branch information
adrianna-chang-shopify committed Feb 2, 2023
1 parent 07f83db commit c637dde
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrib/ruby/test/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,11 @@ def test_timeout_error
end

def test_connection_error
skip("Test fails intermittently with TRILOGY_PROTOCOL_VIOLATION. See https://github.com/github/trilogy/pull/42")
err = assert_raises Trilogy::ConnectionError do
new_tcp_client(username: "foo")
new_tcp_client(username: "native", password: "incorrect")
end

assert_includes err.message, "Access denied for user 'foo'"
assert_includes err.message, "Access denied for user 'native'"
end

def test_connection_closed_error
Expand Down

0 comments on commit c637dde

Please sign in to comment.