Skip to content

Commit 7af16cc

Browse files
committed
Added test that causes segfault
1 parent 8f9fda8 commit 7af16cc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/thread_test.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ class ThreadTest < TinyTds::TestCase
3838
assert x > mintime, "#{x} is not slower than #{mintime} seconds"
3939
end
4040

41+
it 'should not crash on error in parallel' do
42+
threads = []
43+
@numthreads.times do |i|
44+
start = Time.new
45+
threads << Thread.new do
46+
@pool.with do |client|
47+
result = client.execute "select dbname()"
48+
result.each { |r| puts r }
49+
end
50+
end
51+
end
52+
threads.each { |t| t.join }
53+
end
54+
4155
end
4256

4357
end

0 commit comments

Comments
 (0)