Class: TestQueue::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/test_queue/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid, num) ⇒ Worker

Returns a new instance of Worker.



17
18
19
20
21
22
23
# File 'lib/test_queue/runner.rb', line 17

def initialize(pid, num)
  @pid = pid
  @num = num
  @start_time = Time.now
  @output = ''
  @suites = []
end

Instance Attribute Details

#end_timeObject

Returns the value of attribute end_time.



11
12
13
# File 'lib/test_queue/runner.rb', line 11

def end_time
  @end_time
end

#failure_outputObject

Returns the value of attribute failure_output.



12
13
14
# File 'lib/test_queue/runner.rb', line 12

def failure_output
  @failure_output
end

#hostObject

Returns the value of attribute host.



10
11
12
# File 'lib/test_queue/runner.rb', line 10

def host
  @host
end

#numObject

Returns the value of attribute num.



10
11
12
# File 'lib/test_queue/runner.rb', line 10

def num
  @num
end

#outputObject

Returns the value of attribute output.



10
11
12
# File 'lib/test_queue/runner.rb', line 10

def output
  @output
end

#pidObject

Returns the value of attribute pid.



10
11
12
# File 'lib/test_queue/runner.rb', line 10

def pid
  @pid
end

#start_timeObject

Returns the value of attribute start_time.



11
12
13
# File 'lib/test_queue/runner.rb', line 11

def start_time
  @start_time
end

#statusObject

Returns the value of attribute status.



10
11
12
# File 'lib/test_queue/runner.rb', line 10

def status
  @status
end

#suitesObject (readonly)

Array of TestQueue::Stats::Suite recording all the suites this worker ran.



15
16
17
# File 'lib/test_queue/runner.rb', line 15

def suites
  @suites
end

#summaryObject

Returns the value of attribute summary.



12
13
14
# File 'lib/test_queue/runner.rb', line 12

def summary
  @summary
end

Instance Method Details

#linesObject



25
26
27
# File 'lib/test_queue/runner.rb', line 25

def lines
  @output.split("\n")
end