Skip to content

Concurrent::RejectedExecutionError when running with minitest/autorun via JRuby #248

Closed
@iNecas

Description

@iNecas

I've been hitting Concurrent::RejectedExecutionError when running my test-stuite. It was ok with MRI, but switching to JRuby was the game-changer. It turns out there seems to be an at_exit trap that shuts down the Java thread pool. I've first tried to fix that using the same approach as in this test suite, reinitializing the Concurrent.configuration. However, there still was an issue with @root variable in actor keeping the reference to an old thread pool via Delayed (

@root = Delay.new do
Core.new(parent: nil, name: '/', class: Root, initialized: ivar = IVar.new).reference.tap do
ivar.no_error!
end
end
)

So I needed to reinitialize this as well the hackish way:

iNecas/dynflow@b9a7bf2

What do you think about having set of helpers that helps with setting the testing environment and this kind of issues (I guess there might be more: we're not using all the concurrent-ruby features.)

Metadata

Metadata

Assignees

Labels

bugA bug in the library or documentation.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions