Testing JavaSingleThreadExecutor JRuby Integration in concurrent-ruby
This test suite validates the JavaSingleThreadExecutor implementation in the concurrent-ruby library, specifically focusing on JRuby platform compatibility. The tests ensure proper executor service behavior and thread management in a JRuby environment.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
ruby-concurrency/concurrent-ruby
spec/concurrent/executor/java_single_thread_executor_spec.rb
require 'concurrent/utility/engine'
if Concurrent.on_jruby?
require_relative 'executor_service_shared'
module Concurrent
RSpec.describe JavaSingleThreadExecutor, :type=>:jruby do
after(:each) do
subject.shutdown
expect(subject.wait_for_termination(pool_termination_timeout)).to eq true
end
subject { JavaSingleThreadExecutor.new }
it_should_behave_like :executor_service
end
end
end