jason-o-matic-deep_test 1.2.2.9 → 1.2.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,28 +26,12 @@ module DeepTest
26
26
  end
27
27
 
28
28
  def load_files(files)
29
- # # puts "LOAD FILES: #{files.inspect}"
30
29
  @options.new_listener_list.before_remote_load_files
31
- # # $: << "#{@base_path}/lib"
32
- # # puts "RWS LOAD FILES workers: #{@workers.instance_variable_get("@options").new_listener_list.before_remote_load_files.inspect}"
30
+
33
31
  Dir.chdir @base_path
34
32
  resolver = FilenameResolver.new(@base_path)
35
- # # # # require File.expand_path("#{@base_path}/config/environment")
36
- # $: << "#{@base_path}/vendor/rails/activerecord/lib"
37
- # # # # require File.expand_path("#{@base_path}/vendor/rails/activerecord/lib/active_record")
38
- # require "active_record"
39
- # # # # require 'vendor/rails/railties/lib/initializer'
40
- # require File.expand_path("#{@base_path}/lib/my_mysql_setup_listener")
41
- # # # # DeepTest::Database::MysqlSetupListener.new.starting(Struct.new(:number).new(123))
42
- # w = MyMysqlSetupListener.new
43
- # w.starting(Struct.new(:number).new(123))
44
- # ENV["DEEP_TEST_DB"] = w.worker_database
45
-
46
33
 
47
- # Dir.chdir @base_path
48
- # resolver = FilenameResolver.new(@base_path)
49
34
  files.each do |file|
50
- # puts file
51
35
  load resolver.resolve(file)
52
36
  end
53
37
  rescue Exception => e
@@ -20,10 +20,17 @@ module DeepTest
20
20
  assertion_count.times {result.add_assertion}
21
21
  run_count.times {result.add_run}
22
22
  end
23
+
24
+ # repackage failure to include host
25
+ def add_failure(failure)
26
+ super(failure.class.new(failure.test_name + " [#{@host}]", failure.location, failure.message))
27
+ end
23
28
 
29
+ # repackage error to include host
24
30
  def add_error(error)
25
- error.make_exception_marshallable
26
- super(error)
31
+ e = error.class.new(error.test_name + " [#{@host}]", error.exception)
32
+ e.make_exception_marshallable
33
+ super(e)
27
34
  end
28
35
 
29
36
  def failed_due_to_deadlock?
@@ -29,9 +29,16 @@ module DeepTest
29
29
 
30
30
  def run_without_deadlock_protection
31
31
  result = WorkResult.new(@test_case.name)
32
+
33
+ result.host = Socket.gethostname
34
+ start_time = Time.now
35
+
32
36
  output = capture_stdout do
33
37
  @test_case.run(result) {|channel,event|}
34
38
  end
39
+
40
+ result.time = Time.now - start_time
41
+
35
42
  result.output = output
36
43
  result
37
44
  end
@@ -13,14 +13,11 @@ module DeepTest
13
13
  while work_unit = next_work_unit
14
14
  @listener.starting_work(self, work_unit)
15
15
 
16
- start_time = Time.now
17
16
  result = begin
18
17
  work_unit.run
19
18
  rescue Exception => error
20
19
  Error.new(work_unit, error)
21
20
  end
22
- result.time = Time.now - start_time
23
- result.host = Socket.gethostname
24
21
 
25
22
  @listener.finished_work(self, work_unit, result)
26
23
  @blackboard.write_result result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jason-o-matic-deep_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2.9
4
+ version: 1.2.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - anonymous z, Dan Manges, David Vollbracht