<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/deep_test/agent.rb</filename>
    </added>
    <added>
      <filename>sample_rails_project/lib/foreign_host_agent_simulation_listener.rb</filename>
    </added>
    <added>
      <filename>spec/thread_agent.rb</filename>
    </added>
    <added>
      <filename>test/deep_test/agent_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -15,7 +15,7 @@ In your Rakefile:
   # sample DeepTest task
 
   DeepTest::TestTask.new &quot;task_name&quot; do |t|
-    t.number_of_workers = 2   # optional, defaults to 2
+    t.number_of_agents = 2   # optional, defaults to 2
     t.timeout_in_seconds = 30 # optional, defaults to 30
     t.server_port = 6969      # optional, defaults to 6969
     t.pattern = &quot;test/**/*_test.rb&quot;
@@ -26,7 +26,7 @@ In your Rakefile:
 
   Spec::Rake::SpecTask.new(:deep_spec) do |t|
     t.spec_files = FileList['spec/**/*_spec.rb']
-    t.deep_test :number_of_workers =&gt; 2,   # optional, defaults to 2
+    t.deep_test :number_of_agents =&gt; 2,   # optional, defaults to 2
                 :timeout_in_seconds =&gt; 30, # optional, defaults to 30
                 :server_port =&gt; 6969       # optional, defaults to 6969
   end
@@ -39,16 +39,16 @@ In my_listener.rb
     def before_sync
     end
 
-    def before_starting_workers
+    def before_starting_agents
     end
 
-    def starting(worker)
+    def starting(agent)
     end
 
-    def starting_work(worker, work_unit)
+    def starting_work(agent, work_unit)
     end
 
-    def finished_work(worker, work_unit, result)
+    def finished_work(agent, work_unit, result)
     end
   end
 
@@ -59,8 +59,8 @@ In your Rakefile
     t.listener = &quot;MyListener&quot;
   end
 
-An instance of MyListener will be created for each worker that is
-started, and will receive events from that worker.  However, you must ensure
+An instance of MyListener will be created for each agent that is
+started, and will receive events from that agent.  However, you must ensure
 that the MyListener class is loaded at the time that the test files are
 loaded, so it is available to be instantiated.  You can specify multiple
 listener classes by separating them with a comma.  For more information about
@@ -68,12 +68,12 @@ when events are triggered, see the documentation at
 DeepTest::NullListener.
 
 
-=== Setting Up A New Database For Each Worker
+=== Setting Up A New Database For Each Agent
 
 By default, DeepTest will reinitialize ActiveRecord connections if ActiveRecord
-is loaded when the workers are started.  This means all workers are running
-against the same database.  You may want each worker to use a database
-decidicated to it.  To facilitate this, DeepTest provides a worker listener to
+is loaded when the agents are started.  This means all agents are running
+against the same database.  You may want each agent to use a database
+decidicated to it.  To facilitate this, DeepTest provides a agent listener to
 help you.  If you're using Rails with Mysql, simply configure DeepTest as 
 follows in your Rakefile:
 
@@ -83,10 +83,10 @@ follows in your Rakefile:
   end
 
 
-Before spawning workers, DeepTest will dump the schema of the database for the
-current Rails environment (usually test).  As each worker starts up, the
-listener will create a database dedicated to that worker and load the schema
-into it.  The database will be dropped when the worker process exits.  
+Before spawning agents, DeepTest will dump the schema of the database for the
+current Rails environment (usually test).  As each agent starts up, the
+listener will create a database dedicated to that agent and load the schema
+into it.  The database will be dropped when the agent process exits.  
 
 If you're using Mysql but not using Rails, you'll have to create a subclass of
 MysqlSetupListener and override +master_database_config+ and +dump_file_name+,
@@ -103,7 +103,7 @@ project so that it can be included in later releases of DeepTest.
 In addition to running your tests in parallel, DeepTest can also distribute
 them across multiple machines.  It does this by first mirroring the local
 working copy that launched the tests on each machine that will be running tests.
-Then workers are launched on each of the machines and consume tests in the same
+Then agents are launched on each of the machines and consume tests in the same
 fashion as when DeepTest is running locally.
 
 ==== Requirements
@@ -125,9 +125,9 @@ machine.
 On each test machine, execute the following:
   &gt; deep_test test_server
 
-This will launch a server providing mirroring and worker services.  By default,
-2 workers will be launched for each set of tests run.  If you wish to change
-the number of workers, simply specify the --number_of_workers option.  For
+This will launch a server providing mirroring and agent services.  By default,
+2 agents will be launched for each set of tests run.  If you wish to change
+the number of agents, simply specify the --number_of_agents option.  For
 information about what options are available, use -h.  The test_server will
 print out the uri it is bound to, druby://&lt;hostname&gt;:4022 by default.
 
@@ -210,7 +210,7 @@ least have something like this:
 That way you can avoid spending any time mirroring tmp and log files that don't
 have any effect on the tests.  If you are running distributed tests against a
 database, consult the section above about creating a new database for each
-worker to see how to configure DeepTest for your project.  
+agent to see how to configure DeepTest for your project.  
 
 Any number of projects can be run using the same test servers, as long as
 they're all using the same version of Ruby and DeepTest.  </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-* Graceful handling if workers fail to start.
+* Graceful handling if agents fail to start.
 * test loader
 * Log central_command write error
 * Handle not getting all results make more gracefully</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,7 @@ require File.dirname(__FILE__) + &quot;/deep_test/result_reader&quot;
 require File.dirname(__FILE__) + &quot;/deep_test/rspec_detector&quot;
 require File.dirname(__FILE__) + &quot;/deep_test/central_command&quot;
 require File.dirname(__FILE__) + &quot;/deep_test/test_task&quot;
-require File.dirname(__FILE__) + &quot;/deep_test/worker&quot;
+require File.dirname(__FILE__) + &quot;/deep_test/agent&quot;
 require File.dirname(__FILE__) + &quot;/deep_test/warlock&quot;
 
 require File.dirname(__FILE__) + &quot;/deep_test/database/setup_listener&quot;</diff>
      <filename>lib/deep_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,25 +26,25 @@ module DeepTest
       #
       def create_database
         admin_connection do |connection|
-          connection.create_database worker_database
+          connection.create_database agent_database
           grant_privileges connection
         end
       end
 
       #
-      # Grants 'all' privilege on worker database to username and password
-      # specified by worker database config.  If your application has
+      # Grants 'all' privilege on agent database to username and password
+      # specified by agent database config.  If your application has
       # special database privilege needs beyond 'all', you should override
       # this method and grant them.
       #
       def grant_privileges(connection)
-        identified_by = if worker_database_config[:password]
-                          %{identified by %s} % connection.quote(worker_database_config[:password])
+        identified_by = if agent_database_config[:password]
+                          %{identified by %s} % connection.quote(agent_database_config[:password])
                         else
                           &quot;&quot;
                         end
-        sql = %{grant all on #{worker_database}.* to %s@'localhost' #{identified_by} ; } % 
-          connection.quote(worker_database_config[:username])
+        sql = %{grant all on #{agent_database}.* to %s@'localhost' #{identified_by} ; } % 
+          connection.quote(agent_database_config[:username])
 
         connection.execute sql
       end
@@ -54,7 +54,7 @@ module DeepTest
       #
       def drop_database
         admin_connection do |connection|
-          connection.drop_database worker_database
+          connection.drop_database agent_database
         end
       end
 
@@ -68,10 +68,10 @@ module DeepTest
       end
 
       #
-      # Loads dumpfile into worker database using mysql command
+      # Loads dumpfile into agent database using mysql command
       #
       def load_schema
-        config = command_line_config(worker_database_config)
+        config = command_line_config(agent_database_config)
         system &quot;mysql #{config} &lt; #{dump_file_name}&quot;
         raise &quot;Error Loading schema&quot; unless $?.success?
       end</diff>
      <filename>lib/deep_test/database/mysql_setup_listener.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module DeepTest
   module Database
     #
     # Skeleton Listener to help with setting up a separate database
-    # for each worker.  Calls +dump_schema+, +load_schema+, +create_database+,
+    # for each agent.  Calls +dump_schema+, +load_schema+, +create_database+,
     # and +drop_database+ hooks provided by subclasses that implement database
     # setup strategies for particular database flavors.
     #
@@ -13,7 +13,7 @@ module DeepTest
         dump_schema_once
       end
 
-      def before_starting_workers # :nodoc:
+      def before_starting_agents # :nodoc:
         dump_schema_once
       end
 
@@ -23,11 +23,11 @@ module DeepTest
         DUMPED_SCHEMAS &lt;&lt; schema_name
       end
 
-      def starting(worker) # :nodoc:
-        @worker = worker
+      def starting(agent) # :nodoc:
+        @agent = agent
 
         at_exit do
-          DeepTest.logger.debug { &quot;dropping database #{worker_database}&quot; }
+          DeepTest.logger.debug { &quot;dropping database #{agent_database}&quot; }
           drop_database
         end
 
@@ -38,26 +38,26 @@ module DeepTest
       end
 
       #
-      # Called on each worker after creating database and before loading
+      # Called on each agent after creating database and before loading
       # schema to initialize connections
       # 
       def connect_to_database
-        ActiveRecord::Base.establish_connection(worker_database_config)
+        ActiveRecord::Base.establish_connection(agent_database_config)
       end
 
       #
-      # Called in each worker to create the database named by 
-      # +worker_database+.
+      # Called in each agent to create the database named by 
+      # +agent_database+.
       #
       def create_database
         raise &quot;Subclass must implement&quot;
       end
 
       #
-      # Called in each worker to drop the database created by
+      # Called in each agent to drop the database created by
       # +create_database+.  This method is called twice, once before
       # +create_database+ to ensure that no database exists and once
-      # at exit to clean as the worker process exits.  This method
+      # at exit to clean as the agent process exits.  This method
       # must not fail if the database does not exist when it is called.
       #
       def drop_database
@@ -65,12 +65,12 @@ module DeepTest
       end
 
       #
-      # Called before any workers are spawned to dump the schema that
+      # Called before any agents are spawned to dump the schema that
       # will be used for testing.  When running distributed, this method
       # is called on the local machine providing the tests to run.
       #
       # For distributed testing to work, the schema must be dumped in
-      # location accessible by all worker machines.  The easiest way to
+      # location accessible by all agent machines.  The easiest way to
       # accomplish this is to dump it to a location within the working copy.
       #
       def dump_schema
@@ -79,21 +79,21 @@ module DeepTest
 
 
       #
-      # Called once in each worker as it is starting to load the schema
+      # Called once in each agent as it is starting to load the schema
       # dumped from dump_schema.  Subclasses should load the schema definition
-      # into the +worker_database+
+      # into the +agent_database+
       #
       def load_schema
         raise &quot;Subclass must implement&quot;
       end
 
       #
-      # ActiveRecord configuration for the worker database.  By default,
+      # ActiveRecord configuration for the agent database.  By default,
       # the same as +master_database_config+, except that points to
-      # +worker_database+ instead of the database named in the master config.
+      # +agent_database+ instead of the database named in the master config.
       # 
-      def worker_database_config
-        master_database_config.merge(:database =&gt; worker_database)
+      def agent_database_config
+        master_database_config.merge(:database =&gt; agent_database)
       end
 
       #
@@ -106,10 +106,10 @@ module DeepTest
       end
 
       #
-      # Unique name for database on machine that worker is running on.
+      # Unique name for database on machine that agent is running on.
       #
-      def worker_database
-        &quot;deep_test_worker_#{@worker.number}_pid_#{Process.pid}&quot; 
+      def agent_database
+        &quot;deep_test_agent_#{@agent.number}_pid_#{Process.pid}&quot; 
       end
     end
   end</diff>
      <filename>lib/deep_test/database/setup_listener.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module DeepTest
   module Distributed
     #
-    # Work Unit used to measure throughput of workers.
+    # Work Unit used to measure throughput of agents.
     #
     class NullWorkUnit
       def run</diff>
      <filename>lib/deep_test/distributed/null_work_unit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,8 +7,8 @@ module DeepTest
         @connection_info = connection_info
       end
       
-      def number_of_workers
-        @test_server_config[:number_of_workers]
+      def number_of_agents
+        @test_server_config[:number_of_agents]
       end
 
       def central_command</diff>
      <filename>lib/deep_test/distributed/test_server_workers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 module DeepTest
   class LocalDeployment
-    def initialize(options, worker_class = DeepTest::Worker)
+    def initialize(options, agent_class = DeepTest::Agent)
       @options = options
       @warlock = Warlock.new
-      @worker_class = worker_class
+      @agent_class = agent_class
     end
 
     def load_files(files)
@@ -15,15 +15,13 @@ module DeepTest
     end
 
     def start_all
-      each_worker do |worker_num|
-        start_worker(worker_num) do
+      each_agent do |agent_num|
+        start_agent(agent_num) do
           ProxyIO.replace_stdout_stderr!(central_command.stdout, central_command.stderr) do
             reseed_random_numbers
             reconnect_to_database
-            worker = @worker_class.new(worker_num,
-                                      central_command, 
-                                      @options.new_listener_list)
-            worker.run
+            agent = @agent_class.new(agent_num, central_command, @options.new_listener_list)
+            agent.run
           end
         end
       end        
@@ -37,8 +35,8 @@ module DeepTest
       @warlock.wait_for_all_to_finish
     end
 
-    def number_of_workers
-      @options.number_of_workers
+    def number_of_agents
+      @options.number_of_agents
     end
 
     private
@@ -47,16 +45,16 @@ module DeepTest
       ActiveRecord::Base.connection.reconnect! if defined?(ActiveRecord::Base)
     end
 
-    def start_worker(worker_num, &amp;blk)
-      @warlock.start(&quot;worker #{worker_num}&quot;, &amp;blk)
+    def start_agent(agent_num, &amp;blk)
+      @warlock.start(&quot;agent #{agent_num}&quot;, &amp;blk)
     end
 
     def reseed_random_numbers
       srand
     end
 
-    def each_worker
-      number_of_workers.to_i.times { |worker_num| yield worker_num }
+    def each_agent
+      number_of_agents.to_i.times { |agent_num| yield agent_num }
     end
   end
 end</diff>
      <filename>lib/deep_test/local_deployment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ module DeepTest
 
       begin
         central_command = CentralCommand.start(@options)
-        @options.new_listener_list.before_starting_workers
+        @options.new_listener_list.before_starting_agents
         @deployment.start_all
         begin
           DeepTest.logger.debug { &quot;Loader Starting (#{$$})&quot; }
@@ -37,10 +37,10 @@ module DeepTest
 
       first_exception = $!
       begin
-        DeepTest.logger.debug { &quot;Main: Stopping Workers&quot; }
+        DeepTest.logger.debug { &quot;Main: Stopping Agents&quot; }
         @deployment.stop_all
       rescue DRb::DRbConnError
-        # Workers must have already stopped
+        # Agents must have already stopped
       rescue Exception =&gt; e
         raise first_exception || e
       end</diff>
      <filename>lib/deep_test/main.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,51 +12,51 @@ module DeepTest
     end
 
     #
-    # Before DeepTest starts any workers, it instantiates a listener and
+    # Before DeepTest starts any agents, it instantiates a listener and
     # invokes this method.  No other callbacks are made to the listener
     # instance receiving this message. 
     #
-    def before_starting_workers
+    def before_starting_agents
     end
 
     #
-    # A separate listener instance is created in each worker process and
-    # notified that the worker is starting.  The worker for the process is
-    # provided for the listener to use.  If you are using 3 workers, this
+    # A separate listener instance is created in each agent process and
+    # notified that the agent is starting.  The agent for the process is
+    # provided for the listener to use.  If you are using 3 agents, this
     # method is invoked 3 times on 3 distinct instances.  These instances
     # will also receive the starting_work and finished_work callbacks for
-    # the worker provided.
+    # the agent provided.
     #
-    def starting(worker)
+    def starting(agent)
     end
 
     #
-    # Each time a worker takes a work unit, it calls this method before
+    # Each time a agent takes a work unit, it calls this method before
     # doing the work.  In total, this method will be called as many times
     # as there are work units.  The listener instance that received the
-    # starting callback with the worker provided here is the same instance
+    # starting callback with the agent provided here is the same instance
     # that receives this message.
     #
     # Because each work processes work units in a serial fashion, the
     # listener will receive a finished_work message before another
     # starting_work message.
     #
-    def starting_work(worker, work_unit)
+    def starting_work(agent, work_unit)
     end
 
     #
-    # Each time a worker finishes computing a result for a work unit, 
+    # Each time a agent finishes computing a result for a work unit, 
     # it calls this method before sending that result back to the server.
     # In total, this method will be called as many times
     # as there are work units.  The listener instance that received the
-    # starting callback with the worker provided here is the same instance
+    # starting callback with the agent provided here is the same instance
     # that receives this message.
     #
     # Because each work processes work units in a serial fashion, the
     # listener will receive a starting_work message before another
     # finished_work message.
     #
-    def finished_work(worker, work_unit, result)
+    def finished_work(agent, work_unit, result)
     end
   end
 end</diff>
      <filename>lib/deep_test/null_listener.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ module DeepTest
     unless defined?(VALID_OPTIONS)
       VALID_OPTIONS = [
         Option.new(:distributed_hosts, nil),
-        Option.new(:number_of_workers, nil),
+        Option.new(:number_of_agents,   nil),
         Option.new(:metrics_file,      nil),
         Option.new(:pattern,           nil),
         Option.new(:server_port,       6969),
@@ -18,9 +18,9 @@ module DeepTest
 
     attr_accessor *VALID_OPTIONS.map {|o| o.name}
 
-    def number_of_workers
-      return CpuInfo.new.count unless @number_of_workers
-      @number_of_workers
+    def number_of_agents
+      return CpuInfo.new.count unless @number_of_agents
+      @number_of_agents
     end
 
     def ui=(value)</diff>
      <filename>lib/deep_test/options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,7 @@ task :'deep_test:establish_beachhead' do
     options.mirror_path('/tmp'),
     DeepTest::Distributed::TestServerWorkers.new(
       options, 
-      {:number_of_workers =&gt; options.number_of_workers}, 
+      {:number_of_agents =&gt; options.number_of_agents}, 
       DeepTest::Distributed::SshClientConnectionInfo.new
     )
   ) do</diff>
      <filename>lib/deep_test/rake_tasks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ module DeepTest
           result = @central_command.take_result
           next if result.nil?
 
-          if Worker::Error === result
+          if Agent::Error === result
             puts result
             errors += 1
           else</diff>
      <filename>lib/deep_test/result_reader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,11 +5,11 @@ module DeepTest
       end
 
       METHOD_DESCRIPTIONS = {
-        :push_code =&gt; &quot;Synchronizing working copies on worker machines&quot;,
+        :push_code =&gt; &quot;Synchronizing working copies on distributed machines&quot;,
         :establish_beachhead =&gt; &quot;Spawning test environment processes&quot;,
-        :load_files =&gt; &quot;Loading test files for workers&quot;,
-        :start_all =&gt; &quot;Starting workers&quot;,
-        :stop_all =&gt; &quot;Stopping workers&quot;
+        :load_files =&gt; &quot;Loading test files for agents&quot;,
+        :start_all =&gt; &quot;Starting agents&quot;,
+        :stop_all =&gt; &quot;Stopping agents&quot;
       } unless defined?(METHOD_DESCRIPTIONS)
 
       def distributed_failover_to_local(method, exception)</diff>
      <filename>lib/deep_test/ui/console.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,23 +3,23 @@ gem 'rspec', '1.1.8'
 require 'deep_test/rake_tasks'
 
 DeepTest::TestTask.new(:deep_test) do |t|
-  t.number_of_workers = 1
+  t.number_of_agents = 1
   t.pattern = &quot;test/unit/**/*_test.rb&quot;
-  t.listener = &quot;ForeignHostWorkerSimulationListener,DeepTest::Database::MysqlSetupListener&quot;
+  t.listener = &quot;ForeignHostAgentSimulationListener,DeepTest::Database::MysqlSetupListener&quot;
 end
 Rake::Task[:deep_test].enhance [&quot;db:test:prepare&quot;]
 
 Spec::Rake::SpecTask.new(:deep_spec) do |t|
   t.spec_files = FileList['spec/**/*_spec.rb']
-  t.deep_test :number_of_workers =&gt; 2
+  t.deep_test :number_of_agents =&gt; 2
 end
 Rake::Task[:deep_spec].enhance [&quot;db:test:prepare&quot;]
 
 DeepTest::TestTask.new(:distributed_test =&gt; %w[db:test:prepare]) do |t|
-  t.number_of_workers = 1
+  t.number_of_agents = 1
   t.distributed_hosts = %w[localhost]
-  t.requires = File.dirname(__FILE__) + &quot;/../foreign_host_worker_simulation_listener&quot;
-  t.listener = &quot;ForeignHostWorkerSimulationListener,DeepTest::Database::MysqlSetupListener&quot;
+  t.requires = File.dirname(__FILE__) + &quot;/../foreign_host_agent_simulation_listener&quot;
+  t.listener = &quot;ForeignHostAgentSimulationListener,DeepTest::Database::MysqlSetupListener&quot;
   t.sync_options = {:source =&gt; File.expand_path(File.dirname(__FILE__) + &quot;/../..&quot;), 
                     :rsync_options =&gt; &quot;--exclude=.svn --copy-dirlinks&quot;}
 end</diff>
      <filename>sample_rails_project/lib/tasks/deep_test.rake</filename>
    </modified>
    <modified>
      <diff>@@ -2,19 +2,19 @@ require File.dirname(__FILE__) + &quot;/../spec_helper&quot;
 
 module DeepTest
   describe Options do
-    it &quot;should support number_of_workers&quot; do
-      Options.new(:number_of_workers =&gt; 3).number_of_workers.should == 3
+    it &quot;should support number_of_agents&quot; do
+      Options.new(:number_of_agents =&gt; 3).number_of_agents.should == 3
     end
 
-    it &quot;should default to number_of_workers based on cpu info at time of call&quot; do
+    it &quot;should default to number_of_agents based on cpu info at time of call&quot; do
       options = Options.new({})
       CpuInfo.should_receive(:new).and_return stub(&quot;cpu_info&quot;, :count =&gt; 4)
-      options.number_of_workers.should == 4
+      options.number_of_agents.should == 4
     end
 
     it &quot;should have reasonable defaults&quot; do
       options = Options.new({})
-      options.number_of_workers.should == 2
+      options.number_of_agents.should == 2
       options.timeout_in_seconds.should == 30
       options.server_port.should == 6969
       options.pattern.should == nil
@@ -70,7 +70,7 @@ module DeepTest
       listener.listeners.last.should be_instance_of(FakeListener2)
     end
 
-    it &quot;should create a list of worker listeners upon request&quot; do
+    it &quot;should create a list of agent listeners upon request&quot; do
       Options.new({}).new_listener_list.should be_instance_of(DeepTest::ListenerList)
     end
 
@@ -99,7 +99,7 @@ module DeepTest
     end
 
     it &quot;should support strings as well as symbols&quot; do
-      Options.new(&quot;number_of_workers&quot; =&gt; 2).number_of_workers.should == 2
+      Options.new(&quot;number_of_agents&quot; =&gt; 2).number_of_agents.should == 2
     end
 
     it &quot;should raise error when invalid option is specifed&quot; do
@@ -109,17 +109,17 @@ module DeepTest
     end
 
     it &quot;should convert to command line option string&quot; do
-      options = Options.new(:number_of_workers =&gt; 1, :timeout_in_seconds =&gt; 3)
+      options = Options.new(:number_of_agents =&gt; 1, :timeout_in_seconds =&gt; 3)
       options.to_command_line.should == 
         Base64.encode64(Marshal.dump(options)).gsub(&quot;\n&quot;,&quot;&quot;)
     end
 
     it &quot;should parse from command line option string&quot; do
-      options = Options.new(:number_of_workers =&gt; 2, 
+      options = Options.new(:number_of_agents =&gt; 2, 
                             :timeout_in_seconds =&gt; 3,
                             :pattern =&gt; '*')
       parsed_options = Options.from_command_line(options.to_command_line)
-      parsed_options.number_of_workers.should == 2
+      parsed_options.number_of_agents.should == 2
       parsed_options.timeout_in_seconds.should == 3
       parsed_options.pattern.should == '*'
     end</diff>
      <filename>spec/deep_test/options_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,12 +3,12 @@ require File.dirname(__FILE__) + &quot;/../../../spec_helper&quot;
 describe Spec::Rake::SpecTask do
   it &quot;should allow deep_test configuration&quot; do
     t = Spec::Rake::SpecTask.new do |t|
-      t.deep_test :number_of_workers =&gt; 2
+      t.deep_test :number_of_agents =&gt; 2
     end
 
     deep_test_path = File.expand_path(File.dirname(__FILE__) + 
                                       '/../../../../lib/deep_test')
-    options = DeepTest::Options.new(:number_of_workers =&gt; 2)
+    options = DeepTest::Options.new(:number_of_agents =&gt; 2)
     t.spec_opts.should == [&quot;--require #{deep_test_path}&quot;,
                            &quot;--runner 'DeepTest::Spec::Runner:#{options.to_command_line}'&quot;]
   end</diff>
      <filename>spec/deep_test/spec/extensions/spec_task_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,13 +14,13 @@ module DeepTest
           it(&quot;passes2&quot;) {}
         end
 
-        worker = ThreadWorker.new(central_command, 2)
+        agent = ThreadAgent.new(central_command, 2)
         Timeout.timeout(5) do
           runner.process_work_units.should == true
         end
-        worker.wait_until_done
+        agent.wait_until_done
 
-        worker.work_done.should == 2
+        agent.work_done.should == 2
         options.reporter.number_of_examples.should == 2
         central_command.take_result.should be_nil
         options.reporter.examples_finished.should == ['passes1','passes2']
@@ -36,11 +36,11 @@ module DeepTest
           it(&quot;fails&quot;) {1.should == 2}; 
         end
 
-        worker = ThreadWorker.new(central_command, 2)
+        agent = ThreadAgent.new(central_command, 2)
         Timeout.timeout(5) do
           runner.process_work_units.should == false
         end
-        worker.wait_until_done
+        agent.wait_until_done
       end
 
       it &quot;should return success when there are pending examples&quot; do
@@ -51,11 +51,11 @@ module DeepTest
           it(&quot;pending&quot;) {pending {1.should == 2}}; 
         end
 
-        worker = ThreadWorker.new(central_command, 1)
+        agent = ThreadAgent.new(central_command, 1)
         Timeout.timeout(5) do
           runner.process_work_units.should == true
         end
-        worker.wait_until_done
+        agent.wait_until_done
       end
 
       it &quot;should return failure when a pending example passes&quot; do
@@ -66,14 +66,14 @@ module DeepTest
           it(&quot;pending&quot;) {pending {1.should == 1}}; 
         end
 
-        worker = ThreadWorker.new(central_command, 1)
+        agent = ThreadAgent.new(central_command, 1)
         Timeout.timeout(5) do
           runner.process_work_units.should == false
         end
-        worker.wait_until_done
+        agent.wait_until_done
       end
 
-      it &quot;should return failure when a worker error occurs&quot; do
+      it &quot;should return failure when a agent error occurs&quot; do
         central_command = SimpleTestCentralCommand.new
         runner = Runner.new(options, Options.new({}).to_command_line, central_command)
 
@@ -81,7 +81,7 @@ module DeepTest
           it(&quot;pending&quot;) {pending {1.should == 1}}; 
         end
 
-        central_command.write_result Worker::Error.new(&quot;example&quot;, RuntimeError.new)
+        central_command.write_result Agent::Error.new(&quot;example&quot;, RuntimeError.new)
         capture_stdout do
           runner.process_work_units.should == false
         end</diff>
      <filename>spec/deep_test/spec/runner_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.dirname(__FILE__) + &quot;/../lib/deep_test&quot;
 require File.dirname(__FILE__) + &quot;/../test/fake_deadlock_error&quot;
 require File.dirname(__FILE__) + &quot;/../test/simple_test_central_command&quot;
-require File.dirname(__FILE__) + &quot;/thread_worker&quot;
+require File.dirname(__FILE__) + &quot;/thread_agent&quot;
 require 'spec'
 
 describe &quot;sandboxed rspec_options&quot;, :shared =&gt; true do</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,13 +3,13 @@ require File.dirname(__FILE__) + &quot;/../../test_helper&quot;
 module DeepTest
   module Distributed
     unit_tests do
-      test &quot;start_all delegates to worker implementation&quot; do
+      test &quot;start_all delegates to agent implementation&quot; do
         beachhead = Beachhead.new(&quot;&quot;, implementation = mock)
         implementation.expects(:start_all)
         beachhead.start_all
       end
 
-      test &quot;stop_all delegates to worker implementation&quot; do
+      test &quot;stop_all delegates to agent implementation&quot; do
         beachhead = Beachhead.new(&quot;&quot;, implementation = mock)
         implementation.expects(:stop_all)
         beachhead.stop_all.join
@@ -51,7 +51,7 @@ module DeepTest
         beachhead.load_files([&quot;/source/path/my/file.rb&quot;])
       end
 
-      test &quot;service is removed after grace period if workers haven't been started&quot; do
+      test &quot;service is removed after grace period if agents haven't been started&quot; do
         log_level = DeepTest.logger.level
         begin
           DeepTest.logger.level = Logger::ERROR
@@ -73,7 +73,7 @@ module DeepTest
         end
       end
 
-      test &quot;service is not removed after grace period if workers have been started&quot; do
+      test &quot;service is not removed after grace period if agents have been started&quot; do
         log_level = DeepTest.logger.level
         begin
           DeepTest.logger.level = Logger::ERROR</diff>
      <filename>test/deep_test/distributed/beachhead_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module DeepTest
         fleet.establish_beachhead(options)
       end
 
-      test &quot;establish_beachhead returns Beachheads with each worker&quot; do
+      test &quot;establish_beachhead returns Beachheads with each agent&quot; do
         server_1 = mock(:establish_beachhead =&gt; :beachhead_1)
         server_2 = mock(:establish_beachhead =&gt; :beachhead_2)
         options = Options.new({:ui =&gt; &quot;UI::Null&quot;})</diff>
      <filename>test/deep_test/distributed/landing_fleet_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module DeepTest
         fleet.establish_beachhead(options)
       end
 
-      test &quot;establish_beachhead returns Beachheads with each worker&quot; do
+      test &quot;establish_beachhead returns Beachheads with each agent&quot; do
         ship_1 = mock(:establish_beachhead =&gt; :beachhead_1)
         ship_2 = mock(:establish_beachhead =&gt; :beachhead_2)
         options = Options.new({:ui =&gt; &quot;UI::Null&quot;})</diff>
      <filename>test/deep_test/distributed/multi_test_server_proxy_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ module DeepTest
         deployment.load_files [&quot;filelist&quot;]
       end
 
-      test &quot;load_files loads files on worker server&quot; do
+      test &quot;load_files loads files on agent server&quot; do
         beachhead = stub_everything
         deployment = RemoteDeployment.new(
           Options.new(:sync_options =&gt; {:source =&gt; &quot;/tmp&quot;}),
@@ -54,7 +54,7 @@ module DeepTest
         deployment.load_files [&quot;filelist&quot;]
       end
 
-      test &quot;start_all starts workers on worker server&quot; do
+      test &quot;start_all starts agents on agent server&quot; do
         deployment = RemoteDeployment.new(
           options = Options.new(:sync_options =&gt; {:source =&gt; &quot;/tmp&quot;}),
           landing_ship = stub_everything,
@@ -71,7 +71,7 @@ module DeepTest
         deployment.start_all
       end
 
-      test &quot;stop_all stops workers on worker server that was spawned in load_files&quot; do
+      test &quot;stop_all stops agents on agent server that was spawned in load_files&quot; do
         beachhead = stub_everything
         deployment = RemoteDeployment.new(
           Options.new(:sync_options =&gt; {:source =&gt; &quot;/tmp&quot;}),</diff>
      <filename>test/deep_test/distributed/remote_deployment_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,24 +3,24 @@ require File.dirname(__FILE__) + &quot;/../../test_helper&quot;
 module DeepTest
   module Distributed
     unit_tests do
-      test &quot;number_of_workers is determined by mirror server options&quot; do
-        workers = TestServerWorkers.new(
-          Options.new({}), {:number_of_workers =&gt; 4}, mock
+      test &quot;number_of_agents is determined by mirror server options&quot; do
+        agents = TestServerWorkers.new(
+          Options.new({}), {:number_of_agents =&gt; 4}, mock
         )
 
-        assert_equal 4, workers.number_of_workers
+        assert_equal 4, agents.number_of_agents
       end
 
       test &quot;central_command is retrieved using client connection information&quot; do
-        workers = TestServerWorkers.new(
+        agents = TestServerWorkers.new(
           options = Options.new({}),
-          {:number_of_workers =&gt; 4},
+          {:number_of_agents =&gt; 4},
           mock(:address =&gt; &quot;address&quot;)
         )
         DeepTest::CentralCommand.expects(:remote_reference).
           with(&quot;address&quot;, options.server_port).returns(:central_command_reference)
 
-        assert_equal :central_command_reference, workers.central_command
+        assert_equal :central_command_reference, agents.central_command
       end
     end
   end</diff>
      <filename>test/deep_test/distributed/test_server_workers_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,11 +7,11 @@ module DeepTest
         central_command = SimpleTestCentralCommand.new
         runner = ThroughputRunner.new(Options.new({}), 5, central_command)
 
-        worker = ThreadWorker.new(central_command, 5)
+        agent = ThreadAgent.new(central_command, 5)
         Timeout.timeout(5) do
           runner.process_work_units
         end
-        worker.wait_until_done
+        agent.wait_until_done
       end
 
       test &quot;runner yields all results from central_command&quot; do
@@ -22,11 +22,11 @@ module DeepTest
           count += 1
         end
 
-        worker = ThreadWorker.new(central_command, 2)
+        agent = ThreadAgent.new(central_command, 2)
         Timeout.timeout(5) do
           runner.process_work_units
         end
-        worker.wait_until_done
+        agent.wait_until_done
 
         assert_equal 2, count
       end
@@ -35,12 +35,12 @@ module DeepTest
         central_command = SimpleTestCentralCommand.new
         runner = ThroughputRunner.new(Options.new({}), 2, central_command)
 
-        worker = ThreadWorker.new(central_command, 2)
+        agent = ThreadAgent.new(central_command, 2)
         count = 0
         Timeout.timeout(5) do
           runner.process_work_units
         end
-        worker.wait_until_done
+        agent.wait_until_done
 
         assert_kind_of ThroughputStatistics, runner.statistics
       end</diff>
      <filename>test/deep_test/distributed/throughput_runner_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + &quot;/../../test_helper&quot;
 module DeepTest
   module Distributed
     unit_tests do
-      test &quot;start_all starts workers on a new worker server&quot; do
+      test &quot;start_all starts agents on a new agent server&quot; do
         client = ThroughputWorkerClient.new(
           options = Options.new({}),
           landing_ship = stub_everything
@@ -16,7 +16,7 @@ module DeepTest
         client.start_all
       end
 
-      test &quot;stop_all stops workers on worker server that was spawned in start_all&quot; do
+      test &quot;stop_all stops agents on agent server that was spawned in start_all&quot; do
         beachhead = stub_everything
         client = ThroughputWorkerClient.new(
           Options.new({}),</diff>
      <filename>test/deep_test/distributed/throughput_worker_client_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,12 +5,12 @@ module DeepTest
     test &quot;forwards methods defined in NullListener to all listeners&quot; do
       listener_1, listener_2 = mock, mock
       list = ListenerList.new([listener_1, listener_2])
-      listener_1.expects(:starting).with(:worker)
-      listener_2.expects(:starting).with(:worker)
-      listener_1.expects(:starting_work).with(:worker, :work)
-      listener_2.expects(:starting_work).with(:worker, :work)
-      list.starting(:worker)
-      list.starting_work(:worker, :work)
+      listener_1.expects(:starting).with(:agent)
+      listener_2.expects(:starting).with(:agent)
+      listener_1.expects(:starting_work).with(:agent, :work)
+      listener_2.expects(:starting_work).with(:agent, :work)
+      list.starting(:agent)
+      list.starting_work(:agent, :work)
     end
 
     test &quot;doesn't forward methods not defined in NullListener&quot; do</diff>
      <filename>test/deep_test/listener_list_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,17 +2,17 @@ require File.dirname(__FILE__) + &quot;/../test_helper&quot;
 
 module DeepTest
   unit_tests do
-    test &quot;number_of_workers is determined by options&quot; do
+    test &quot;number_of_agents is determined by options&quot; do
       deployment = LocalDeployment.new(
-        Options.new(:number_of_workers =&gt; 4)
+        Options.new(:number_of_agents =&gt; 4)
       )
 
-      assert_equal 4, deployment.number_of_workers
+      assert_equal 4, deployment.number_of_agents
     end
 
     test &quot;load_files simply loads each file provided&quot; do
       deployment = LocalDeployment.new(
-        Options.new(:number_of_workers =&gt; 4)
+        Options.new(:number_of_agents =&gt; 4)
       )
 
       deployment.expects(:load).with(:file_1)
@@ -22,19 +22,19 @@ module DeepTest
     end
 
     test &quot;start_all redirects stdout and stderr back to central_command&quot; do
-      worker_class = Class.new do
-        def initialize(worker_num, central_command, listeners);  end
+      agent_class = Class.new do
+        def initialize(agent_num, central_command, listeners);  end
         def run; puts &quot;hello stdout&quot;; $stderr.puts &quot;hello stderr&quot; end
       end
 
       central_command = stub :stdout =&gt; StringIO.new, :stderr =&gt; StringIO.new
 
       with_drb_server_for central_command do |drb_server|
-        options = stub :number_of_workers =&gt; 1, 
+        options = stub :number_of_agents =&gt; 1, 
                        :central_command =&gt; DRbObject.new_with_uri(drb_server.uri),
                        :new_listener_list =&gt; []
 
-        run_workers_to_completion LocalDeployment.new(options, worker_class)
+        run_agents_to_completion LocalDeployment.new(options, agent_class)
       end
 
       assert_equal &quot;hello stdout\n&quot;, central_command.stdout.string
@@ -52,7 +52,7 @@ module DeepTest
       end
     end
 
-    def run_workers_to_completion(deployment)
+    def run_agents_to_completion(deployment)
       deployment.start_all
       deployment.wait_for_completion
     ensure</diff>
      <filename>test/deep_test/local_deployment_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -76,12 +76,12 @@ module DeepTest
       assert_equal &quot;&quot;, out
     end
 
-    test &quot;prints useful error information in case of Worker::Error&quot; do
+    test &quot;prints useful error information in case of Agent::Error&quot; do
       error = RuntimeError.new &quot;message&quot;
       error.set_backtrace ['a', 'b']
 
       central_command = SimpleTestCentralCommand.new
-      central_command.write_result Worker::Error.new(&quot;work_unit&quot;, error)
+      central_command.write_result Agent::Error.new(&quot;work_unit&quot;, error)
 
 
       out = capture_stdout do
@@ -91,9 +91,9 @@ module DeepTest
       assert_equal &quot;work_unit: message\na\nb\n&quot;, out
     end
 
-    test &quot;doesn't yield Worker::Error results&quot; do
+    test &quot;doesn't yield Agent::Error results&quot; do
       central_command = SimpleTestCentralCommand.new
-      central_command.write_result Worker::Error.new(&quot;work_unit&quot;, RuntimeError.new)
+      central_command.write_result Agent::Error.new(&quot;work_unit&quot;, RuntimeError.new)
 
 
       results = []
@@ -115,7 +115,7 @@ module DeepTest
     test &quot;returns remaining tests that didn't have errors&quot; do
       central_command = SimpleTestCentralCommand.new
       central_command.write_result FakeResult.new(1)
-      central_command.write_result Worker::Error.new(&quot;work_unit&quot;, RuntimeError.new)
+      central_command.write_result Agent::Error.new(&quot;work_unit&quot;, RuntimeError.new)
 
       work_units = {1 =&gt; &quot;One&quot;, 2 =&gt; &quot;Two&quot;}
 </diff>
      <filename>test/deep_test/result_reader_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,17 +25,17 @@ module DeepTest
         supervised_suite = SupervisedTestSuite.new(test_case_class.suite, central_command)
         result = ::Test::Unit::TestResult.new
 
-        worker = ThreadWorker.new(central_command, 2)
+        agent = ThreadAgent.new(central_command, 2)
         Timeout.timeout(5) do
           supervised_suite.run(result) {}
         end
-        worker.wait_until_done
+        agent.wait_until_done
 
         assert_equal 2, result.run_count
         assert_equal 1, result.failure_count
       end
 
-      test &quot;worker errors are counted as errors&quot; do
+      test &quot;agent errors are counted as errors&quot; do
         test_case = Class.new(::Test::Unit::TestCase) do
           test(&quot;1&quot;) {}
         end.new(&quot;test_1&quot;)
@@ -44,7 +44,7 @@ module DeepTest
         supervised_suite = SupervisedTestSuite.new(test_case, central_command)
         result = ::Test::Unit::TestResult.new
 
-        central_command.write_result Worker::Error.new(test_case, RuntimeError.new)
+        central_command.write_result Agent::Error.new(test_case, RuntimeError.new)
         capture_stdout {supervised_suite.run(result) {}}
 
         assert_equal 1, result.error_count
@@ -60,13 +60,13 @@ module DeepTest
 
         yielded = []
 
-        worker = ThreadWorker.new(central_command, 1)
+        agent = ThreadAgent.new(central_command, 1)
         Timeout.timeout(5) do
           supervised_suite.run(stub_everything) do |channel,name|
             yielded &lt;&lt; [channel, name]
           end
         end
-        worker.wait_until_done
+        agent.wait_until_done
 
         assert_equal true, yielded.include?([::Test::Unit::TestCase::FINISHED, test_case.name])
       end</diff>
      <filename>test/deep_test/test/supervised_test_suite_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,6 @@ require &quot;deep_test/rake_tasks&quot;
 task :default =&gt; %w[deep_test_failing]
 
 DeepTest::TestTask.new :deep_test_failing do |t|
-  t.number_of_workers = 1
+  t.number_of_agents = 1
   t.pattern = &quot;test/failing.rb&quot;
 end</diff>
      <filename>test/failing.rake</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ require File.dirname(__FILE__) + &quot;/fake_deadlock_error&quot;
 require File.dirname(__FILE__) + &quot;/simple_test_central_command&quot;
 require File.dirname(__FILE__) + &quot;/test_factory&quot;
 require File.dirname(__FILE__) + &quot;/test_logger&quot;
-require File.dirname(__FILE__) + &quot;/../spec/thread_worker&quot;
+require File.dirname(__FILE__) + &quot;/../spec/thread_agent&quot;
 
 class SomeCustomException &lt; RuntimeError
 end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -56,20 +56,20 @@ module DeepTest
       Rake::Task[&quot;deep_test&quot;].instance_variable_get(&quot;@actions&quot;).last.call
     end
     
-    test &quot;number_of_workers defaults to count from CpuInfo&quot; do
+    test &quot;number_of_agents defaults to count from CpuInfo&quot; do
       task = TestTask.new do |t|
         t.stubs(:define)
       end
       CpuInfo.expects(:new).returns stub(:count =&gt; 2)
-      assert_equal 2, task.number_of_workers
+      assert_equal 2, task.number_of_agents
     end
     
-    test &quot;number_of_workers can be set&quot; do
+    test &quot;number_of_agents can be set&quot; do
       task = TestTask.new do |t|
-        t.number_of_workers = 42
+        t.number_of_agents = 42
         t.stubs(:define)
       end
-      assert_equal 42, task.number_of_workers
+      assert_equal 42, task.number_of_agents
     end
   end
 end</diff>
      <filename>test/test_task_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/deep_test/worker.rb</filename>
    </removed>
    <removed>
      <filename>sample_rails_project/lib/foreign_host_worker_simulation_listener.rb</filename>
    </removed>
    <removed>
      <filename>spec/thread_worker.rb</filename>
    </removed>
    <removed>
      <filename>test/deep_test/worker_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>892999ff506b1b999bdd2720bceea58e001b9d62</id>
    </parent>
  </parents>
  <author>
    <name>qxjit (David Vollbracht)</name>
    <email>david.vollbracht@gmail.com</email>
  </author>
  <url>http://github.com/qxjit/deep-test/commit/578b22033d417548d752f91696695156f1162804</url>
  <id>578b22033d417548d752f91696695156f1162804</id>
  <committed-date>2009-06-27T12:55:44-07:00</committed-date>
  <authored-date>2009-06-27T12:55:44-07:00</authored-date>
  <message>rename worker to agent</message>
  <tree>05a5c38af06022f357b1855f96c8a47fd39dbdbd</tree>
  <committer>
    <name>qxjit (David Vollbracht)</name>
    <email>david.vollbracht@gmail.com</email>
  </committer>
</commit>
