summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-06-14 07:55:43 +0200
committerJean Boussier <[email protected]>2025-06-14 07:55:43 +0200
commit74cdf8727e6eb2f958a8516c44fcb1d429a3451c (patch)
tree9875aea1d66c53dc79f5ee01a9fcc4bb8aac85e6
parent68625a23d6deeb2e4c498d4bccc36d616608e05f (diff)
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.
-rw-r--r--test/ruby/test_object_id.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/ruby/test_object_id.rb b/test/ruby/test_object_id.rb
index 018cc81496..9c0099517b 100644
--- a/test/ruby/test_object_id.rb
+++ b/test/ruby/test_object_id.rb
@@ -243,35 +243,4 @@ class TestObjectIdRactor < Test::Unit::TestCase
assert_equal object_id, obj.object_id
end;
end
-
- def test_object_id_race_free_with_stress_compact
- assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
- begin;
- Warning[:experimental] = false
- class MyClass
- attr_reader :a, :b, :c
- def initialize
- @a = @b = @c = nil
- end
- end
- N = 20
- objs = Ractor.make_shareable(N.times.map { MyClass.new })
-
- GC.stress = true
- GC.auto_compact = true if GC.respond_to?(:auto_compact=)
-
- results = 4.times.map{
- Ractor.new(objs) { |objs|
- vars = []
- ids = []
- objs.each do |obj|
- vars << obj.a << obj.b << obj.c
- ids << obj.object_id
- end
- [vars, ids]
- }
- }.map(&:value)
- assert_equal 1, results.uniq.size
- end;
- end
end