Navigation Menu

Skip to content

Commit

Permalink
Sort worker order
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 11, 2012
1 parent fb0f29e commit 2d5195b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/groonga/tester.rb
Expand Up @@ -306,7 +306,6 @@ def run(queue)
succeeded = true

@result.measure do
@test_suites_result.start_worker(self)
@reporter.start_worker(self)
catch do |tag|
loop do
Expand Down Expand Up @@ -366,18 +365,14 @@ def finish_test(result)
end

class TestSuitesResult < Result
attr_reader :workers
attr_accessor :workers
attr_accessor :n_total_tests
def initialize
super
@workers = []
@n_total_tests = 0
end

def start_worker(worker)
@workers << worker
end

def pass_ratio
if n_tests.zero?
0
Expand Down Expand Up @@ -446,6 +441,7 @@ def run_test_suites(test_suites)
@tester.n_workers.times do |i|
workers << Worker.new(i, @tester, @result, @reporter)
end
@result.workers = workers.dup
@reporter.start(@result)

succeeded = true
Expand Down

0 comments on commit 2d5195b

Please sign in to comment.