File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,9 @@ def wait_up_to(secs, &condition)
343
343
]
344
344
wait_up_to ( 0.2 ) { threads [ 3 ] . status == 'sleep' }
345
345
# The last 3 threads should be waiting to acquire read locks now...
346
- # TODO (pitr-ch 15-Oct-2016): https://travis-ci.org/ruby-concurrency/concurrent-ruby/jobs/166777543
347
- ( 1 ..3 ) . each { |n | expect ( threads [ n ] . status ) . to eql "sleep" }
346
+ unless Concurrent . on_jruby? # flaky on JRuby
347
+ ( 1 ..3 ) . each { |n | expect ( threads [ n ] . status ) . to eql "sleep" }
348
+ end
348
349
( 1 ..3 ) . each { |n | expect ( threads [ n ] ) . not_to hold ( lock ) . for_read }
349
350
# Throw latch2 and the writer will wake up and release its write lock...
350
351
latch2 . count_down
@@ -361,7 +362,9 @@ def wait_up_to(secs, &condition)
361
362
]
362
363
wait_up_to ( 0.2 ) { threads [ 1 ] . status == 'sleep' }
363
364
# The last thread should be waiting to acquire a write lock now...
364
- expect ( threads [ 1 ] . status ) . to eql "sleep"
365
+ unless Concurrent . on_jruby? # flaky on JRuby
366
+ expect ( threads [ 1 ] . status ) . to eql "sleep"
367
+ end
365
368
expect ( threads [ 1 ] ) . not_to hold ( lock ) . for_write
366
369
# Throw latch2 and the writer will wake up and release its write lock...
367
370
latch2 . count_down
You can’t perform that action at this time.
0 commit comments