Skip to content

Commit 1859c26

Browse files
author
Matias Martini
committed
Test(client): Add dead test after closing client
We recently encountered an unexpected Segmentation Fault Error when checking whether a client was dead after closing it. To consider this in the future, I've updated the test cases for the client to include this scenario, so we can catch any issues earlier on.
1 parent c8111e6 commit 1859c26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/client_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class ClientTest < TinyTds::TestCase
1616
assert @client.close
1717
assert @client.closed?
1818
assert !@client.active?
19+
assert @client.dead?
1920
action = lambda { @client.execute('SELECT 1 as [one]').each }
2021
assert_raise_tinytds_error(action) do |e|
2122
assert_match %r{closed connection}i, e.message, 'ignore if non-english test run'

0 commit comments

Comments
 (0)