Sha256: 045462ac83096bc98b9550556aae5eef0e97e6d9c718f101c2d68f28029e1f7c

Contents?: true

Size: 1.46 KB

Versions: 11

Compression:

Stored size: 1.46 KB

Contents

module DeepTest
  module Distributed
    class MultiTestServerProxy
      def initialize(options, slaves)
        DeepTest.logger.debug "MultiTestServerProxy#initialize #{slaves.length} slaves"
        @slave_controller = DispatchController.new(options, slaves)
      end

      def spawn_worker_server(options)
        DeepTest.logger.debug "dispatch spawn_worker_server for #{options.origin_hostname}"
        WorkerServerProxy.new options,
                              @slave_controller.dispatch(:spawn_worker_server, 
                                                         options)
      end

      def sync(options)
        DeepTest.logger.debug "dispatch sync for #{options.origin_hostname}"
        @slave_controller.dispatch(:sync, options)
      end

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

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

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

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

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
jason-o-matic-deep_test-1.2.2.1 lib/deep_test/distributed/multi_test_server_proxy.rb
jason-o-matic-deep_test-1.2.2.2 lib/deep_test/distributed/multi_test_server_proxy.rb
jperkins-deep_test-1.2.2 lib/deep_test/distributed/multi_test_server_proxy.rb
jstorimer-deep-test-1.4.0 lib/deep_test/distributed/multi_test_server_proxy.rb
jstorimer-deep-test-1.3.0 lib/deep_test/distributed/multi_test_server_proxy.rb
jstorimer-deep-test-1.2.0 lib/deep_test/distributed/multi_test_server_proxy.rb
jstorimer-deep-test-1.1.0 lib/deep_test/distributed/multi_test_server_proxy.rb
jstorimer-deep-test-1.0.0 lib/deep_test/distributed/multi_test_server_proxy.rb
deep_test-1.2.0 lib/deep_test/distributed/multi_test_server_proxy.rb
deep_test-1.2.2 lib/deep_test/distributed/multi_test_server_proxy.rb
deep_test-1.2.1 lib/deep_test/distributed/multi_test_server_proxy.rb