<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,7 +31,7 @@ module Workling
             logger.debug(&quot;Discovered listener #{clazz}&quot;)
             @workers.add(Thread.new(clazz) { |c| clazz_listen(c) })
           end
-        
+          
           # Wait for all workers to complete
           @workers.list.each { |t| t.join }
 
@@ -44,11 +44,18 @@ module Workling
       
         # Check if all Worker threads have been started. 
         def started?
-          Workling::Discovery.discovered.size == @workers.list.size
+          logger.debug(&quot;checking if started... list size is #{ worker_threads }&quot;)
+          Workling::Discovery.discovered.size == worker_threads
+        end
+        
+        # number of worker threads running
+        def worker_threads
+          @workers.list.size
         end
       
         # Gracefully stop processing
         def stop
+          logger.info(&quot;stopping threaded poller...&quot;)
           sleep 1 until started? # give it a chance to start up before shutting down. 
           logger.info(&quot;Giving Listener Threads a chance to shut down. This may take a while... &quot;)
           @workers.list.each { |w| w[:shutdown] = true }
@@ -73,7 +80,7 @@ module Workling
           connection = @client_class.new
           connection.connect
           logger.info(&quot;** Starting client #{ connection.class } for #{clazz.name} queue&quot;)
-        
+     
           # Start dispatching those messages
           while (!Thread.current[:shutdown]) do
             begin</diff>
      <filename>lib/workling/remote/invokers/threaded_poller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,7 @@ context &quot;the invoker 'threaded poller'&quot; do
     
     client = mock()
     client.expects(:retrieve).at_least_once.returns(&quot;hi&quot;)
+    client.expects(:connect).at_least_once.returns(true)
     Workling::Clients::MemoryQueueClient.expects(:new).at_least_once.returns(client)
     
     # Don't take longer than 10 seconds to shut this down. </diff>
      <filename>test/invoker_threaded_poller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ $:.unshift plugin_lib, plugin_test
 RAILS_ENV = &quot;test&quot;
 RAILS_ROOT = File.dirname(__FILE__) + &quot;/..&quot; # fake the rails root directory.
 RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
-RAILS_DEFAULT_LOGGER.level = Logger::ERROR
+RAILS_DEFAULT_LOGGER.level = Logger::WARN
 
 require &quot;mocks/spawn&quot;
 require &quot;mocks/logger&quot;</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b46e88a66f65cdc13c3d3d6bd72c799ef5ba065d</id>
    </parent>
  </parents>
  <author>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </author>
  <url>http://github.com/purzelrakete/workling/commit/c3a5db984d98bddf74cb57d24b4f06d9b25943c0</url>
  <id>c3a5db984d98bddf74cb57d24b4f06d9b25943c0</id>
  <committed-date>2008-11-06T15:08:07-08:00</committed-date>
  <authored-date>2008-11-06T15:08:07-08:00</authored-date>
  <message>all tests passing again</message>
  <tree>11b8963ccb39aaaaebe9648ae626613f670a6214</tree>
  <committer>
    <name>Rany Keddo</name>
    <email>rany@playtype.net</email>
  </committer>
</commit>
