Skip to content

Commit 74cdf87

Browse files
committed
Remove test_object_id_race_free_with_stress_compact
This test was written for another implementation of `#object_id` which had complex interations with GC, that's not the case of the implementation that was actually merged.
1 parent 68625a2 commit 74cdf87

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

test/ruby/test_object_id.rb

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -243,35 +243,4 @@ def initialize
243243
assert_equal object_id, obj.object_id
244244
end;
245245
end
246-
247-
def test_object_id_race_free_with_stress_compact
248-
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
249-
begin;
250-
Warning[:experimental] = false
251-
class MyClass
252-
attr_reader :a, :b, :c
253-
def initialize
254-
@a = @b = @c = nil
255-
end
256-
end
257-
N = 20
258-
objs = Ractor.make_shareable(N.times.map { MyClass.new })
259-
260-
GC.stress = true
261-
GC.auto_compact = true if GC.respond_to?(:auto_compact=)
262-
263-
results = 4.times.map{
264-
Ractor.new(objs) { |objs|
265-
vars = []
266-
ids = []
267-
objs.each do |obj|
268-
vars << obj.a << obj.b << obj.c
269-
ids << obj.object_id
270-
end
271-
[vars, ids]
272-
}
273-
}.map(&:value)
274-
assert_equal 1, results.uniq.size
275-
end;
276-
end
277246
end

0 commit comments

Comments
 (0)