Don't exit on shutdown, just break out (lets unit tests continue)

This commit is contained in:
Jordan Sissel 2012-09-01 16:25:01 -07:00
parent 1f317a73b0
commit 1f991c7417

View file

@ -466,6 +466,7 @@ class LogStash::Agent
if @plugins.values.count { |p| p.alive? } == 0 if @plugins.values.count { |p| p.alive? } == 0
@logger.warn("no plugins running, shutting down") @logger.warn("no plugins running, shutting down")
shutdown shutdown
break
end end
@logger.debug("heartbeat") @logger.debug("heartbeat")
end end
@ -484,7 +485,6 @@ class LogStash::Agent
shutdown_plugins(@plugins) shutdown_plugins(@plugins)
# When we get here, all inputs have finished, all messages are done # When we get here, all inputs have finished, all messages are done
@logger.info("Shutdown complete") @logger.info("Shutdown complete")
exit(0)
end # def shutdown end # def shutdown
def shutdown_plugins(plugins) def shutdown_plugins(plugins)