jstorimer-deep-test 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/README.rdoc +70 -41
- data/Rakefile +104 -32
- data/TODO +2 -2
- data/VERSION +1 -1
- data/bin/deep_test +15 -0
- data/jstorimer-deep-test-0.1.0.gem +0 -0
- data/jstorimer-deep-test.gemspec +1425 -0
- data/lib/deep_test.rb +40 -28
- data/lib/deep_test/database/mysql_setup_listener.rb +12 -12
- data/lib/deep_test/database/setup_listener.rb +23 -23
- data/lib/deep_test/distributed/dispatch_controller.rb +10 -17
- data/lib/deep_test/distributed/drb_client_connection_info.rb +15 -0
- data/lib/deep_test/distributed/master_test_server.rb +52 -0
- data/lib/deep_test/distributed/multi_test_server_proxy.rb +44 -0
- data/lib/deep_test/distributed/null_work_unit.rb +12 -0
- data/lib/deep_test/distributed/remote_worker_client.rb +54 -0
- data/lib/deep_test/distributed/remote_worker_server.rb +82 -0
- data/lib/deep_test/distributed/rsync.rb +12 -25
- data/lib/deep_test/distributed/show_status.rhtml +41 -0
- data/lib/deep_test/distributed/test_server.rb +78 -0
- data/lib/deep_test/distributed/test_server_status.rb +9 -0
- data/lib/deep_test/distributed/test_server_workers.rb +24 -0
- data/lib/deep_test/distributed/throughput_runner.rb +42 -0
- data/lib/deep_test/distributed/throughput_statistics.rb +26 -0
- data/lib/deep_test/distributed/throughput_worker_client.rb +19 -0
- data/lib/deep_test/extensions/drb_extension.rb +34 -0
- data/lib/deep_test/listener_list.rb +1 -1
- data/lib/deep_test/local_workers.rb +55 -0
- data/lib/deep_test/logger.rb +2 -17
- data/lib/deep_test/marshallable_exception_wrapper.rb +4 -4
- data/lib/deep_test/metrics/gatherer.rb +67 -0
- data/lib/deep_test/metrics/queue_lock_wait_time_measurement.rb +133 -0
- data/lib/deep_test/{null_listener.rb → null_worker_listener.rb} +14 -14
- data/lib/deep_test/option.rb +60 -0
- data/lib/deep_test/options.rb +42 -45
- data/lib/deep_test/process_orchestrator.rb +49 -0
- data/lib/deep_test/rake_tasks.rb +1 -3
- data/lib/deep_test/result_reader.rb +6 -10
- data/lib/deep_test/rspec_detector.rb +1 -1
- data/lib/deep_test/server.rb +75 -0
- data/lib/deep_test/spec.rb +1 -5
- data/lib/deep_test/spec/extensions/example_methods.rb +1 -7
- data/lib/deep_test/spec/extensions/reporter.rb +29 -0
- data/lib/deep_test/spec/extensions/spec_task.rb +2 -3
- data/lib/deep_test/spec/runner.rb +17 -32
- data/lib/deep_test/spec/work_result.rb +0 -2
- data/lib/deep_test/test/runner.rb +2 -2
- data/lib/deep_test/test/supervised_test_suite.rb +10 -9
- data/lib/deep_test/test/work_result.rb +0 -1
- data/lib/deep_test/test_task.rb +1 -1
- data/lib/deep_test/ui/console.rb +11 -9
- data/lib/deep_test/warlock.rb +25 -37
- data/lib/deep_test/worker.rb +57 -0
- data/sample_rails_project/deep_test.rb +0 -4
- data/sample_rails_project/lib/{foreign_host_agent_simulation_listener.rb → foreign_host_worker_simulation_listener.rb} +4 -6
- data/sample_rails_project/lib/tasks/deep_test.rake +4 -13
- data/script/internal/run_test_suite.rb +7 -0
- data/script/public/master_test_server.rb +24 -0
- data/script/public/test_server.rb +18 -0
- data/script/public/test_throughput.rb +29 -0
- data/spec/deep_test/option_spec.rb +33 -0
- data/spec/deep_test/options_spec.rb +59 -80
- data/spec/deep_test/spec/extensions/example_methods_spec.rb +4 -5
- data/spec/deep_test/spec/extensions/spec_task_spec.rb +6 -4
- data/spec/deep_test/spec/runner_spec.rb +32 -59
- data/spec/spec_helper.rb +6 -14
- data/spec/thread_worker.rb +25 -0
- data/test/deep_test/database/mysql_setup_listener_test.rb +9 -13
- data/test/deep_test/distributed/dispatch_controller_test.rb +177 -130
- data/test/deep_test/distributed/drb_client_connection_info_test.rb +42 -0
- data/test/deep_test/distributed/filename_resolver_test.rb +34 -38
- data/test/deep_test/distributed/master_test_server_test.rb +32 -0
- data/test/deep_test/distributed/multi_test_server_proxy_test.rb +96 -0
- data/test/deep_test/distributed/remote_worker_client_test.rb +180 -0
- data/test/deep_test/distributed/remote_worker_server_test.rb +99 -0
- data/test/deep_test/distributed/rsync_test.rb +62 -42
- data/test/deep_test/distributed/test_server_test.rb +94 -0
- data/test/deep_test/distributed/test_server_workers_test.rb +26 -0
- data/test/deep_test/distributed/throughput_runner_test.rb +68 -0
- data/test/deep_test/distributed/throughput_worker_client_test.rb +28 -0
- data/test/deep_test/listener_list_test.rb +15 -17
- data/test/deep_test/local_workers_test.rb +22 -0
- data/test/deep_test/logger_test.rb +7 -34
- data/test/deep_test/marshallable_exception_wrapper_test.rb +29 -31
- data/test/deep_test/metrics/gatherer_test.rb +66 -0
- data/test/deep_test/process_orchestrator_test.rb +11 -0
- data/test/deep_test/result_reader_test.rb +95 -95
- data/test/deep_test/server_test.rb +58 -0
- data/test/deep_test/test/extensions/error_test.rb +36 -38
- data/test/deep_test/test/runner_test.rb +3 -7
- data/test/deep_test/test/supervised_test_suite_test.rb +61 -89
- data/test/deep_test/test/work_result_test.rb +76 -80
- data/test/deep_test/test/work_unit_test.rb +51 -53
- data/test/deep_test/test_task_test.rb +38 -10
- data/test/deep_test/ui/console_test.rb +4 -8
- data/test/deep_test/warlock_test.rb +31 -33
- data/test/deep_test/worker_test.rb +94 -0
- data/test/failing.rake +11 -0
- data/{negative_acceptance_tests/failing_test.rb → test/failing.rb} +1 -3
- data/{infrastructure → test}/fake_deadlock_error.rb +0 -0
- data/test/simple_test_blackboard.rb +45 -0
- data/test/simple_test_blackboard_test.rb +33 -0
- data/{infrastructure → test}/test_factory.rb +0 -0
- data/test/test_helper.rb +5 -20
- data/test/test_task_test.rb +57 -60
- metadata +78 -87
- data/infrastructure/dynamic_teardown.rb +0 -22
- data/infrastructure/load.rb +0 -11
- data/infrastructure/test_central_command.rb +0 -15
- data/infrastructure/test_exception.rb +0 -7
- data/infrastructure/test_logger.rb +0 -11
- data/infrastructure/test_operator.rb +0 -15
- data/infrastructure/test_result.rb +0 -15
- data/infrastructure/thread_agent.rb +0 -21
- data/infrastructure/timewarp/Rakefile +0 -14
- data/infrastructure/timewarp/lib/timewarp.rb +0 -21
- data/infrastructure/timewarp/test/timewarp_test.rb +0 -45
- data/lib/deep_test/agent.rb +0 -108
- data/lib/deep_test/central_command.rb +0 -165
- data/lib/deep_test/cpu_info.rb +0 -22
- data/lib/deep_test/demon.rb +0 -25
- data/lib/deep_test/distributed/beachhead.rb +0 -104
- data/lib/deep_test/distributed/establish_beachhead.rb +0 -19
- data/lib/deep_test/distributed/landing_fleet.rb +0 -30
- data/lib/deep_test/distributed/landing_ship.rb +0 -60
- data/lib/deep_test/distributed/remote_deployment.rb +0 -56
- data/lib/deep_test/distributed/shell_environment.rb +0 -50
- data/lib/deep_test/distributed/ssh_client_connection_info.rb +0 -14
- data/lib/deep_test/failure_message.rb +0 -19
- data/lib/deep_test/lib_root.rb +0 -4
- data/lib/deep_test/local_deployment.rb +0 -46
- data/lib/deep_test/main.rb +0 -41
- data/lib/deep_test/metrics/data.rb +0 -34
- data/lib/deep_test/metrics/measurement.rb +0 -39
- data/lib/deep_test/proxy_io.rb +0 -77
- data/lib/deep_test/test/run_test_suite.rb +0 -5
- data/lib/telegraph.rb +0 -29
- data/lib/telegraph/ack_sequence.rb +0 -14
- data/lib/telegraph/logging.rb +0 -20
- data/lib/telegraph/message.rb +0 -39
- data/lib/telegraph/operator.rb +0 -47
- data/lib/telegraph/switchboard.rb +0 -57
- data/lib/telegraph/wire.rb +0 -73
- data/negative_acceptance_tests/dying_spec.rb +0 -13
- data/negative_acceptance_tests/dying_test.rb +0 -13
- data/negative_acceptance_tests/failing_spec.rb +0 -9
- data/negative_acceptance_tests/kill_agent_one_on_start_work.rb +0 -16
- data/negative_acceptance_tests/passing_spec.rb +0 -10
- data/negative_acceptance_tests/passing_test.rb +0 -12
- data/negative_acceptance_tests/tasks.rake +0 -87
- data/negative_acceptance_tests/tests.rb +0 -60
- data/test/deep_test/agent_test.rb +0 -175
- data/test/deep_test/central_command_test.rb +0 -147
- data/test/deep_test/cpu_info_test.rb +0 -33
- data/test/deep_test/demon_test.rb +0 -23
- data/test/deep_test/distributed/beachhead_test.rb +0 -67
- data/test/deep_test/distributed/landing_fleet_test.rb +0 -55
- data/test/deep_test/distributed/landing_ship_test.rb +0 -48
- data/test/deep_test/distributed/remote_deployment_test.rb +0 -134
- data/test/deep_test/distributed/shell_environment_fixtures/set_bar_to_foo +0 -1
- data/test/deep_test/distributed/shell_environment_fixtures/set_foo_to_bar +0 -1
- data/test/deep_test/distributed/shell_environment_fixtures/set_foo_to_baz +0 -1
- data/test/deep_test/distributed/shell_environment_test.rb +0 -108
- data/test/deep_test/distributed/ssh_client_connection_info_test.rb +0 -34
- data/test/deep_test/local_deployment_test.rb +0 -19
- data/test/deep_test/main_test.rb +0 -12
- data/test/deep_test/metrics/data_test.rb +0 -22
- data/test/deep_test/metrics/measurement_test.rb +0 -18
- data/test/deep_test/proxy_io_test.rb +0 -104
data/lib/telegraph.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'socket'
|
2
|
-
require File.dirname(__FILE__) + "/telegraph/logging"
|
3
|
-
require File.dirname(__FILE__) + "/telegraph/ack_sequence"
|
4
|
-
require File.dirname(__FILE__) + "/telegraph/message"
|
5
|
-
require File.dirname(__FILE__) + "/telegraph/wire"
|
6
|
-
require File.dirname(__FILE__) + "/telegraph/operator"
|
7
|
-
require File.dirname(__FILE__) + "/telegraph/switchboard"
|
8
|
-
|
9
|
-
module Telegraph
|
10
|
-
class Ping
|
11
|
-
attr_reader :value
|
12
|
-
|
13
|
-
def initialize(value)
|
14
|
-
@value = value
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
class Pong
|
19
|
-
attr_reader :value
|
20
|
-
|
21
|
-
def initialize(value)
|
22
|
-
@value = value
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class NoMessageAvailable < StandardError; end
|
27
|
-
class LineDead < StandardError; end
|
28
|
-
end
|
29
|
-
|
data/lib/telegraph/logging.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'logger'
|
2
|
-
|
3
|
-
module Telegraph
|
4
|
-
module Logging
|
5
|
-
def self.logger
|
6
|
-
@logger ||= begin
|
7
|
-
l = Logger.new($stdout)
|
8
|
-
l.level = Logger.const_get((ENV['TELEGRAPH_LOG_LEVEL'] || 'info').upcase)
|
9
|
-
l.formatter = proc do |sev, time, progmane, msg|
|
10
|
-
"[#{time.strftime "%T"}] (pid #{Process.pid}) #{msg}\n"
|
11
|
-
end
|
12
|
-
l
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def debug
|
17
|
-
Logging.logger.debug { "#{self.class}: #{yield}" }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
data/lib/telegraph/message.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
module Telegraph
|
2
|
-
class Message
|
3
|
-
include Logging
|
4
|
-
|
5
|
-
attr_reader :body, :sequence_number, :sequence_ack
|
6
|
-
|
7
|
-
def initialize(body, sequence_number, sequence_ack)
|
8
|
-
@body = body
|
9
|
-
@sequence_number = sequence_number
|
10
|
-
@sequence_ack = sequence_ack
|
11
|
-
end
|
12
|
-
|
13
|
-
def write(stream)
|
14
|
-
message_data = Marshal.dump(body)
|
15
|
-
debug { "send #{message_data[4..20]}... (#{message_data.length} bytes)" }
|
16
|
-
stream.write [message_data.size, @sequence_number, @sequence_ack || 0].pack("NNN") + message_data
|
17
|
-
end
|
18
|
-
|
19
|
-
class <<self
|
20
|
-
include Logging
|
21
|
-
|
22
|
-
def read(stream)
|
23
|
-
header_data = read_data(stream, 12, "header")
|
24
|
-
size, sequence_number, sequence_ack = header_data.unpack("NNN")
|
25
|
-
|
26
|
-
message_data = read_data(stream, size, "message")
|
27
|
-
debug { "read #{message_data[4..20]}... (#{message_data.length} bytes)" }
|
28
|
-
Message.new Marshal.load(message_data), sequence_number, (sequence_ack == 0 ? nil : sequence_ack)
|
29
|
-
end
|
30
|
-
|
31
|
-
def read_data(stream, length, label)
|
32
|
-
data = stream.read(length)
|
33
|
-
raise IOError, "connection closed" unless data
|
34
|
-
raise IOError, "incomplete #{label} data" unless data.length == length
|
35
|
-
data
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/lib/telegraph/operator.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'thread'
|
2
|
-
|
3
|
-
module Telegraph
|
4
|
-
class Operator
|
5
|
-
include Logging
|
6
|
-
|
7
|
-
attr_reader :switchboard
|
8
|
-
|
9
|
-
def self.listen(host, port, switchboard = Switchboard.new)
|
10
|
-
new TCPServer.new(host, port), switchboard
|
11
|
-
end
|
12
|
-
|
13
|
-
def initialize(socket, switchboard)
|
14
|
-
@socket = socket
|
15
|
-
@switchboard = switchboard
|
16
|
-
@accept_thread = Thread.new do
|
17
|
-
@socket.listen 100
|
18
|
-
loop do
|
19
|
-
if @should_shutdown
|
20
|
-
@socket.close
|
21
|
-
@switchboard.close_all_wires
|
22
|
-
break
|
23
|
-
end
|
24
|
-
|
25
|
-
begin
|
26
|
-
client = @socket.accept_nonblock
|
27
|
-
debug { "Accepted connection: #{client.inspect}" }
|
28
|
-
@switchboard.add_wire Wire.new(client)
|
29
|
-
rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
|
30
|
-
connection_ready, = IO.select([@socket], nil, nil, 0.25)
|
31
|
-
retry if connection_ready
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def port
|
38
|
-
@socket.addr[1]
|
39
|
-
end
|
40
|
-
|
41
|
-
def shutdown
|
42
|
-
debug { "Shutting down" }
|
43
|
-
@should_shutdown = true
|
44
|
-
@accept_thread.join
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
module Telegraph
|
2
|
-
class Switchboard
|
3
|
-
include Logging
|
4
|
-
|
5
|
-
def process_messages(options = {:timeout => 0})
|
6
|
-
yield next_message(options) while true
|
7
|
-
rescue NoMessageAvailable
|
8
|
-
retry
|
9
|
-
end
|
10
|
-
|
11
|
-
def next_message(options = {:timeout => 0})
|
12
|
-
debug { "Waiting for next message on any of #{live_wires.size} wires for #{options[:timeout]} seconds" }
|
13
|
-
|
14
|
-
if live_wires.empty?
|
15
|
-
sleep 0.01
|
16
|
-
Thread.pass
|
17
|
-
raise NoMessageAvailable
|
18
|
-
end
|
19
|
-
|
20
|
-
readers, = IO.select live_wires.map {|w| w.stream}, nil, nil, options[:timeout]
|
21
|
-
raise NoMessageAvailable unless readers
|
22
|
-
|
23
|
-
wire = using_wires {|wires| wires.detect {|w| w.stream == readers.first} }
|
24
|
-
return wire.next_message(options.merge(:timeout => 0)), wire
|
25
|
-
rescue LineDead => e
|
26
|
-
debug { "LineDead: #{e.message} while reading message from wire" }
|
27
|
-
raise NoMessageAvailable
|
28
|
-
end
|
29
|
-
|
30
|
-
def any_live_wires?
|
31
|
-
live_wires.any?
|
32
|
-
end
|
33
|
-
|
34
|
-
def drop_wire(wire)
|
35
|
-
using_wires {|w| w.delete wire }
|
36
|
-
end
|
37
|
-
|
38
|
-
def add_wire(wire)
|
39
|
-
using_wires {|w| w << wire }
|
40
|
-
end
|
41
|
-
|
42
|
-
def close_all_wires
|
43
|
-
debug { "Closing all wires" }
|
44
|
-
using_wires {|w| w.each { |wire| wire.close rescue nil } }
|
45
|
-
end
|
46
|
-
|
47
|
-
def live_wires
|
48
|
-
using_wires {|w| w.select {|wire| !wire.closed?}}
|
49
|
-
end
|
50
|
-
|
51
|
-
def using_wires
|
52
|
-
@wires ||= []
|
53
|
-
@wires_mutex ||= Mutex.new
|
54
|
-
@wires_mutex.synchronize { yield @wires }
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
data/lib/telegraph/wire.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
module Telegraph
|
2
|
-
class Wire
|
3
|
-
include Logging
|
4
|
-
|
5
|
-
attr_reader :stream
|
6
|
-
|
7
|
-
def self.connect(host, port)
|
8
|
-
wire = new TCPSocket.new(host, port)
|
9
|
-
return wire unless block_given?
|
10
|
-
begin
|
11
|
-
yield wire
|
12
|
-
ensure
|
13
|
-
wire.close
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def initialize(stream)
|
18
|
-
@sequence = AckSequence.new
|
19
|
-
@stream = stream
|
20
|
-
end
|
21
|
-
|
22
|
-
def close
|
23
|
-
if @stream.closed?
|
24
|
-
debug { "stream already closed" }
|
25
|
-
else
|
26
|
-
debug { "closing stream #{@stream.inspect}" }
|
27
|
-
@stream.close
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def closed?
|
32
|
-
@stream.closed?
|
33
|
-
end
|
34
|
-
|
35
|
-
def send_message(body, options = {})
|
36
|
-
sequence_ack = options[:ack] ? options[:ack].sequence_number : nil
|
37
|
-
message = Message.new(body, @sequence.next, sequence_ack)
|
38
|
-
message.write stream
|
39
|
-
unacked_sequences_numbers[message.sequence_number] = message if options[:need_ack]
|
40
|
-
rescue IOError, Errno::EPIPE, Errno::ECONNRESET => e
|
41
|
-
close rescue nil
|
42
|
-
raise LineDead, e.message
|
43
|
-
end
|
44
|
-
|
45
|
-
def process_messages(options = {:timeout => 0})
|
46
|
-
yield next_message(options) while true
|
47
|
-
rescue NoMessageAvailable
|
48
|
-
retry
|
49
|
-
end
|
50
|
-
|
51
|
-
def next_message(options = {:timeout => 0})
|
52
|
-
begin
|
53
|
-
raise NoMessageAvailable unless IO.select [@stream], nil, nil, options[:timeout]
|
54
|
-
message = Message.read(@stream)
|
55
|
-
unacked_sequences_numbers.delete message.sequence_ack if message.sequence_ack
|
56
|
-
return message
|
57
|
-
rescue IOError, Errno::ECONNRESET => e
|
58
|
-
raise LineDead, e.message
|
59
|
-
end
|
60
|
-
rescue LineDead
|
61
|
-
close rescue nil
|
62
|
-
raise
|
63
|
-
end
|
64
|
-
|
65
|
-
def unacked_sequences_numbers
|
66
|
-
@unacked_sequences_numbers ||= {}
|
67
|
-
end
|
68
|
-
|
69
|
-
def unacked_messages
|
70
|
-
unacked_sequences_numbers.values
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class KillAgentOneOnStartWork
|
2
|
-
def before_sync
|
3
|
-
end
|
4
|
-
def before_starting_agents
|
5
|
-
end
|
6
|
-
def starting(agent)
|
7
|
-
end
|
8
|
-
def starting_work(agent, work_unit)
|
9
|
-
if agent.number == 1
|
10
|
-
puts "Killing Agent 1 to see if CentralCommand redispatches work"
|
11
|
-
exit!(0)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
def finished_work(agent, work_unit, result)
|
15
|
-
end
|
16
|
-
end
|
@@ -1,87 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rubygems'
|
3
|
-
gem 'rspec', '1.1.12'
|
4
|
-
require 'spec/rake/spectask'
|
5
|
-
$LOAD_PATH << File.dirname(__FILE__) + "/../lib"
|
6
|
-
require "deep_test"
|
7
|
-
require "deep_test/rake_tasks"
|
8
|
-
|
9
|
-
DeepTest::TestTask.new :deep_test_failing do |t|
|
10
|
-
t.number_of_agents = 1
|
11
|
-
t.pattern = "negative_acceptance_tests/failing_test.rb"
|
12
|
-
end
|
13
|
-
|
14
|
-
DeepTest::TestTask.new :deep_test_passing do |t|
|
15
|
-
t.pattern = "negative_acceptance_tests/passing_test.rb"
|
16
|
-
end
|
17
|
-
|
18
|
-
DeepTest::TestTask.new :deep_test_failover_to_local do |t|
|
19
|
-
t.number_of_agents = 1
|
20
|
-
t.pattern = "negative_acceptance_tests/passing_test.rb"
|
21
|
-
t.distributed_hosts = %w[host.foobar]
|
22
|
-
t.sync_options = {:source => File.dirname(__FILE__), :rsync_options => "--exclude=.svn"}
|
23
|
-
end
|
24
|
-
|
25
|
-
DeepTest::TestTask.new :deep_test_just_one_with_host_down do |t|
|
26
|
-
t.number_of_agents = 1
|
27
|
-
t.pattern = "negative_acceptance_tests/passing_test.rb"
|
28
|
-
t.distributed_hosts = %w[localhost host.foobar]
|
29
|
-
t.sync_options = {:source => File.dirname(__FILE__), :rsync_options => "--exclude=.svn"}
|
30
|
-
end
|
31
|
-
|
32
|
-
DeepTest::TestTask.new :deep_test_with_agents_dying do |t|
|
33
|
-
t.number_of_agents = 1
|
34
|
-
t.pattern = "negative_acceptance_tests/dying_test.rb"
|
35
|
-
end
|
36
|
-
|
37
|
-
DeepTest::TestTask.new :deep_test_with_work_taken_and_not_done do |t|
|
38
|
-
t.number_of_agents = 2
|
39
|
-
t.listener = "KillAgentOneOnStartWork"
|
40
|
-
t.requires = 'negative_acceptance_tests/kill_agent_one_on_start_work.rb'
|
41
|
-
t.pattern = "negative_acceptance_tests/passing_test.rb"
|
42
|
-
end
|
43
|
-
|
44
|
-
DeepTest::TestTask.new :deep_test_with_metrics do |t|
|
45
|
-
t.pattern = "negative_acceptance_tests/passing_test.rb"
|
46
|
-
t.metrics_file = "negative_acceptance_tests/metrics.data"
|
47
|
-
end
|
48
|
-
|
49
|
-
Spec::Rake::SpecTask.new :deep_spec_failing do |t|
|
50
|
-
t.deep_test :number_of_agents => 1
|
51
|
-
t.spec_files = FileList["negative_acceptance_tests/failing_spec.rb"]
|
52
|
-
end
|
53
|
-
|
54
|
-
Spec::Rake::SpecTask.new :deep_spec_passing do |t|
|
55
|
-
t.deep_test :number_of_agents => 1
|
56
|
-
t.spec_files = FileList["negative_acceptance_tests/passing_spec.rb"]
|
57
|
-
end
|
58
|
-
|
59
|
-
Spec::Rake::SpecTask.new :deep_spec_failover_to_local do |t|
|
60
|
-
t.deep_test :number_of_agents => 1,
|
61
|
-
:distributed_hosts => %w[host.foobar],
|
62
|
-
:sync_options => {:source => File.dirname(__FILE__), :rsync_options => "--exclude=.svn"}
|
63
|
-
t.spec_files = FileList["negative_acceptance_tests/passing_spec.rb"]
|
64
|
-
end
|
65
|
-
|
66
|
-
Spec::Rake::SpecTask.new :deep_spec_just_one_with_host_down do |t|
|
67
|
-
t.deep_test :number_of_agents => 1,
|
68
|
-
:distributed_hosts => %w[localhost host.foobar],
|
69
|
-
:sync_options => {:source => File.dirname(__FILE__), :rsync_options => "--exclude=.svn"}
|
70
|
-
t.spec_files = FileList["negative_acceptance_tests/passing_spec.rb"]
|
71
|
-
end
|
72
|
-
|
73
|
-
Spec::Rake::SpecTask.new :deep_spec_with_agents_dying do |t|
|
74
|
-
t.deep_test :number_of_agents => 2
|
75
|
-
t.spec_files = FileList["negative_acceptance_tests/dying_spec.rb"]
|
76
|
-
end
|
77
|
-
|
78
|
-
Spec::Rake::SpecTask.new :deep_spec_with_work_taken_and_not_done do |t|
|
79
|
-
t.spec_files = FileList['negative_acceptance_tests/kill_agent_one_on_start_work.rb',
|
80
|
-
"negative_acceptance_tests/passing_test.rb"]
|
81
|
-
t.deep_test :number_of_agents => 2, :listener => "KillAgentOneOnStartWork"
|
82
|
-
end
|
83
|
-
|
84
|
-
Spec::Rake::SpecTask.new :deep_spec_with_metrics do |t|
|
85
|
-
t.deep_test :number_of_agents => 1, :metrics_file => "negative_acceptance_tests/metrics.data"
|
86
|
-
t.spec_files = FileList["negative_acceptance_tests/passing_spec.rb"]
|
87
|
-
end
|