class Minitest::DRb::Client::Executor
Public Class Methods
Source
# File lib/minitest/drb.rb, line 74 def initialize url ::DRb.stop_service @url = url @queue = nil @reporter = nil @server_reporter = nil end
Public Instance Methods
Source
# File lib/minitest/drb.rb, line 86 def << work @reporter = work.last # Clients are going to load all test cases, and they will still try # to queue up all their work, but we don't want the clients queued # up work, we want the server's queued up work. So we'll just do # nothing when someone tries to queue work in a client end
Source
# File lib/minitest/drb.rb, line 94 def shutdown # Loop, running tests until we find a `nil` in the work queue while job = @queue.pop klass = job[0] method = job[1] @server_reporter ||= job[2] result = Minitest.run_one_method(klass, method) # Report the result locally @reporter.record result # Report the result back to the server @queue.record @server_reporter, result end # After we've finished all our work, let the server know we're done @queue.finish end
Source
# File lib/minitest/drb.rb, line 82 def start @queue = ::DRbObject.new_with_uri(@url) end