Skip to content

Commit c3662b9

Browse files
committed
Marked a ThreadLocalVar test pending on Rbx
The test passes on all platforms except Rbx-2 where it consistently fails. We believe the problem is with the call to GC.start within the test. As far as we know the code under test *should* work on all platforms because it is pure Ruby. We cannot say for certain at this time.
1 parent 49f7cb3 commit c3662b9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

spec/concurrent/atomic/thread_local_var_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ module Concurrent
5151
expect(var.instance_variable_get(:@storage).keys.size).to be == 1
5252
end
5353

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
54+
it 'does not leave values behind when bind is not used' do
55+
if rbx?
56+
pending('fails on Rbx, possibly due to test dependency on GC')
6757
end
58+
tries = Array.new(10) do
59+
var = ThreadLocalVar.new(0)
60+
10.times.map do |i|
61+
Thread.new { var.value = i; var.value }
62+
end.each(&:join)
63+
var.value = 0
64+
GC.start
65+
var.instance_variable_get(:@storage).keys.size == 1
66+
end
67+
expect(tries.any?).to be_truthy
6868
end
6969
end
7070
end

0 commit comments

Comments
 (0)