Sha256: de8bcdfb8c59d0c366f7d4fec628cf08104d914cbf7dcb1e0066f88d0e4550bf

Contents?: true

Size: 1013 Bytes

Versions: 15

Compression:

Stored size: 1013 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Minitest
  module Distributed
    class TestRunner
      extend T::Sig

      sig { returns(T::Hash[Symbol, T.untyped]) }
      attr_reader :options

      sig { returns(Configuration) }
      attr_reader :configuration

      sig { returns(TestSelector) }
      attr_reader :test_selector

      sig { returns(Coordinators::CoordinatorInterface) }
      attr_reader :coordinator

      sig { params(options: T::Hash[Symbol, T.untyped]).void }
      def initialize(options)
        @options = options

        @configuration = T.let(@options[:distributed], Configuration)
        @coordinator = T.let(configuration.coordinator, Coordinators::CoordinatorInterface)
        @test_selector = T.let(TestSelector.new(options), TestSelector)
      end

      sig { params(reporter: AbstractReporter).void }
      def run(reporter)
        coordinator.produce(test_selector: test_selector)
        coordinator.consume(reporter: reporter)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
minitest-distributed-0.2.11 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.10 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.9 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.8 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.7 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.6 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.5 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.2 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.4 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.3 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.1 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.2.0 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.1.2 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.1.1 lib/minitest/distributed/test_runner.rb
minitest-distributed-0.1.0 lib/minitest/distributed/test_runner.rb