Skip to content

Commit 1b75fb2

Browse files
committed
Lower number of threads in a ractor in a bootstrap test
OpenBSD CI now runs inside a qemu virtual machine inside a Ubuntu virtual machine, without hardware virtualization support. It is limited to 2.5GB of RAM and only 2 vCPUs. There is a bootstrap test that fails on it due to resource issues. ``` bootstraptest.test_ractor.rb_1536_1361.rb:8:in 'Thread#initialize': can't create Thread: Cannot allocate memory (ThreadError) ``` Fix this by using 100 threads instead of 1000.
1 parent 3300f1e commit 1b75fb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎bootstraptest/test_ractor.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,10 +1534,10 @@ class C
15341534
}
15351535

15361536
assert_equal '1', %q{
1537-
N = 1_000
1537+
N = 100
15381538
Ractor.new{
15391539
a = []
1540-
1_000.times.map{|i|
1540+
100.times.map{|i|
15411541
Thread.new(i){|i|
15421542
Thread.pass if i < N
15431543
a << Ractor.store_if_absent(:i){ i }

0 commit comments

Comments
 (0)