Module: Fluent::Test::StartupShutdown

Defined in:
lib/fluent/test/startup_shutdown.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setupObject



32
33
34
35
# File 'lib/fluent/test/startup_shutdown.rb', line 32

def self.setup
  @server = ServerEngine::SocketManager::Server.open
  ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = @server.path.to_s
end

.teardownObject



37
38
39
40
41
# File 'lib/fluent/test/startup_shutdown.rb', line 37

def self.teardown
  @server.close
  # on Windows, the path is a TCP port number
  FileUtils.rm_f @server.path unless Fluent.windows?
end

Instance Method Details

#shutdownObject



28
29
30
# File 'lib/fluent/test/startup_shutdown.rb', line 28

def shutdown
  @server.close
end

#startupObject



23
24
25
26
# File 'lib/fluent/test/startup_shutdown.rb', line 23

def startup
  @server = ServerEngine::SocketManager::Server.open
  ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = @server.path.to_s
end