Class: DeepTest::Distributed::MultiTestServerProxy::WorkerServerProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_test/distributed/multi_test_server_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, slaves) ⇒ WorkerServerProxy

Returns a new instance of WorkerServerProxy.



64
65
66
67
68
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 64

def initialize(options, slaves)
  @slaves = slaves
  DeepTest.logger.debug "WorkerServerProxy#initialize #{slaves.inspect}"
  @slave_controller = DispatchController.new(options, slaves)
end

Instance Attribute Details

#slavesObject (readonly)

Returns the value of attribute slaves.



62
63
64
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 62

def slaves
  @slaves
end

Instance Method Details

#load_files(files) ⇒ Object



70
71
72
73
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 70

def load_files(files)
  DeepTest.logger.debug "dispatch load_files"
  @slave_controller.dispatch(:load_files, files)
end

#start_allObject



75
76
77
78
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 75

def start_all
  DeepTest.logger.debug "dispatch start_all"
  @slave_controller.dispatch(:start_all)
end

#stop_allObject



80
81
82
83
# File 'lib/deep_test/distributed/multi_test_server_proxy.rb', line 80

def stop_all
  DeepTest.logger.debug "dispatch stop_all"
  @slave_controller.dispatch_with_options(:stop_all, :ignore_connection_error => true)
end