Created
September 1, 2014 13:05
-
-
Save olleolleolle/8d70e0651c7006d4cc6e to your computer and use it in GitHub Desktop.
Celluloid 0.16.0.pre3 issue description: When running these quite small actors in a supervised pool, they do not start they are not available in the Celluloid::Actor[] registry as they were in v0.15.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#gem 'celluloid', '>= 0.16.0.pre3' | |
gem 'celluloid', '>= 0.15.2' | |
gem 'rspec' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
specs: | |
celluloid (0.15.2) | |
timers (~> 1.1.0) | |
diff-lcs (1.2.5) | |
rspec (3.0.0) | |
rspec-core (~> 3.0.0) | |
rspec-expectations (~> 3.0.0) | |
rspec-mocks (~> 3.0.0) | |
rspec-core (3.0.4) | |
rspec-support (~> 3.0.0) | |
rspec-expectations (3.0.4) | |
diff-lcs (>= 1.2.0, < 2.0) | |
rspec-support (~> 3.0.0) | |
rspec-mocks (3.0.4) | |
rspec-support (~> 3.0.0) | |
rspec-support (3.0.4) | |
timers (1.1.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
celluloid (>= 0.15.2) | |
rspec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'celluloid' | |
class SmallActor | |
include Celluloid | |
def example_method | |
:dude | |
end | |
end | |
class SmallActorSupervisor < Celluloid::SupervisionGroup | |
pool SmallActor, as: :small_actor | |
end | |
SmallActorSupervisor.run! | |
class SmallInterface | |
def method_missing(method_sym, *arguments, &block) | |
Celluloid::Actor[:small_actor].public_send(method_sym, *arguments, &block) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "small_actor" | |
describe SmallActor do | |
before do | |
Celluloid.boot | |
sleep 0.1 | |
Celluloid::Actor[:small_actor].example_method | |
end | |
after do | |
Celluloid.shutdown | |
end | |
it 'is running' do | |
expect(Celluloid::Actor[:small_actor]).not_to be_nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment