[ap4r-devel] [215] trunk/samples/HelloWorld/test: Log message arrangement in testing.

shino at rubyforge.org shino at rubyforge.org
Thu May 31 01:30:44 EDT 2007


Revision: 215
Author:   shino
Date:     2007-05-31 01:30:42 -0400 (Thu, 31 May 2007)

Log Message:
-----------
Log message arrangement in testing.
Adding a directory for integration test with rails and AP4R servers.

Modified Paths:
--------------
    trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/ap4r_test_helper.rb
    trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/hello_world_stories_test.rb

Added Paths:
-----------
    trunk/samples/HelloWorld/test/async/

Modified: trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/ap4r_test_helper.rb
===================================================================
--- trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/ap4r_test_helper.rb	2007-05-30 08:28:46 UTC (rev 214)
+++ trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/ap4r_test_helper.rb	2007-05-31 05:30:42 UTC (rev 215)
@@ -40,16 +40,15 @@
 
     command = "ruby #{@test_config["start_ruby_args"]} #{@root_dir}/script/mongrel_ap4r.rb " +
       "start -d -c #{@root_dir} -A #{@config_file}"
-    print "executing command: #{command} ..."
+    print "Starting AP4R with command: #{command} ..."
     system(command)
-
+    print "and waiting..."
     return unless wait_until_started
     50.times do
       print "."
       begin
         if qm.alive?
-          puts
-          puts "ap4r service has started"
+          puts "Done."
           return
         end
       rescue => e
@@ -62,12 +61,9 @@
   def stop_ap4r_service
     command = "ruby #{@test_config["stop_ruby_args"]} #{@root_dir}/script/mongrel_ap4r.rb " +
       "stop -c #{@root_dir}"
-    print "executing command: #{command} ..."
+    puts "Terminating AP4R with command: #{command}."
     system(command)
-    puts
-
     @qm = nil
-    puts "ap4r service has stopped"
   end
 
   def clear(*queues)
@@ -107,14 +103,14 @@
   # Starts rails service.
   # Invokes mongrel_rails, so mongrel_rails should be installed.
   def start_rails_service
+    print "Starting Mongrel(Rails)..."
     system("mongrel_rails start -d --environment test")
-    puts "rails service has started"
+    puts "Done."
   end
 
   # Stops rails service.
   def stop_rails_service
     system("mongrel_rails stop")
-    puts "rails service has stopped"
   end
 
   def start_dispatchers

Modified: trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/hello_world_stories_test.rb
===================================================================
--- trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/hello_world_stories_test.rb	2007-05-30 08:28:46 UTC (rev 214)
+++ trunk/samples/HelloWorld/test/integration/with_rails_and_ap4r/hello_world_stories_test.rb	2007-05-31 05:30:42 UTC (rev 215)
@@ -14,7 +14,6 @@
 class HelloWorldStoriesTest < Test::Unit::TestCase
 
   def test_http_dispatch
-    puts "test case invoked"
 #    with_services do
       ap4r_helper.stop_dispatchers
       assert_one_line_added do




More information about the ap4r-devel mailing list