spec/arborist/client_spec.rb in arborist-0.0.1.pre20160606141735 vs spec/arborist/client_spec.rb in arborist-0.0.1.pre20160829140603
- old
+ new
@@ -10,26 +10,26 @@
let( :client ) { described_class.new }
describe "synchronous API", :testing_manager do
before( :each ) do
- @manager = make_testing_manager()
@manager_thread = Thread.new do
+ @manager = make_testing_manager()
Thread.current.abort_on_exception = true
@manager.run
Loggability[ Arborist ].info "Stopped the test manager"
end
count = 0
- until @manager.running? || count > 30
+ until (@manager && @manager.running?) || count > 30
sleep 0.1
count += 1
end
raise "Manager didn't start up" unless @manager.running?
end
after( :each ) do
- @manager.stop
+ @manager.simulate_signal( :TERM )
@manager_thread.join
count = 0
while @manager.zmq_loop.running? || count > 30
sleep 0.1