File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ branches:
2020
2121matrix :
2222 allow_failures :
23- - rvm : rbx-2
2423 - rvm : ruby-head
2524 - rvm : jruby-head
2625 - rvm : 1.9.3
Original file line number Diff line number Diff line change @@ -51,17 +51,20 @@ module Concurrent
5151 expect ( var . instance_variable_get ( :@storage ) . keys . size ) . to be == 1
5252 end
5353
54- it 'does not leave values behind when bind is not used' do
55- tries = Array . new ( 10 ) do
56- var = ThreadLocalVar . new ( 0 )
57- 10 . times . map do |i |
58- Thread . new { var . value = i ; var . value }
59- end . each ( &:join )
60- var . value = 0
61- GC . start
62- var . instance_variable_get ( :@storage ) . keys . size == 1
54+ unless rbx?
55+ #NOTE: This test depends on GC which works differently under Rbx
56+ it 'does not leave values behind when bind is not used' do
57+ tries = Array . new ( 10 ) do
58+ var = ThreadLocalVar . new ( 0 )
59+ 10 . times . map do |i |
60+ Thread . new { var . value = i ; var . value }
61+ end . each ( &:join )
62+ var . value = 0
63+ GC . start
64+ var . instance_variable_get ( :@storage ) . keys . size == 1
65+ end
66+ expect ( tries . any? ) . to be_truthy
6367 end
64- expect ( tries . any? ) . to be_truthy
6568 end
6669 end
6770 end
You can’t perform that action at this time.
0 commit comments