From 8b1ee8efa4ab6fbd8cffb4bcf21e310710a33d12 Mon Sep 17 00:00:00 2001
From: Benjamin Blanc <benjamin.blanc@tiolive.com>
Date: Tue, 30 Jul 2013 13:50:58 +0200
Subject: [PATCH] scalability: reactive testing

---
 .../scalability/runScalabilityTestSuite.py    | 38 +++++++++----------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/erp5/util/scalability/runScalabilityTestSuite.py b/erp5/util/scalability/runScalabilityTestSuite.py
index 6f9beb8524..925a9ac30d 100644
--- a/erp5/util/scalability/runScalabilityTestSuite.py
+++ b/erp5/util/scalability/runScalabilityTestSuite.py
@@ -302,22 +302,20 @@ class ScalabilityLauncher(object):
 
           self.log("user_number: %s" %str(user_number))
           self.log("test_duration: %ss" %str(test_duration))
-
-          #Here: wait for 0-pending activities ?
     
-#          tester_process = subprocess.Popen([tester_path,
-#                 self.__argumentNamespace.erp5_url,
-#                 str(user_number),
-#                 ' '.join(test_suites),
-#                 '--benchmark-path-list', benchmark_path_list,
-#                 '--users-file-path', user_file_path,
-#                 '--filename-prefix', "%s_%s_" %(LOG_FILE_PREFIX, current_test.title),
-#                 '--report-directory', self.__argumentNamespace.log_path,
-#                 '--repeat', "%s" %str(MAX_DOCUMENTS),
-#              ])
-#          
-#          time.sleep(test_duration)
-#          tester_process.send_signal(signal.SIGINT)
+          tester_process = subprocess.Popen([tester_path,
+                 self.__argumentNamespace.erp5_url,
+                 str(user_number),
+                 ' '.join(test_suites),
+                 '--benchmark-path-list', benchmark_path_list,
+                 '--users-file-path', user_file_path,
+                 '--filename-prefix', "%s_%s_" %(LOG_FILE_PREFIX, current_test.title),
+                 '--report-directory', self.__argumentNamespace.log_path,
+                 '--repeat', "%s" %str(MAX_DOCUMENTS),
+              ])
+          
+          time.sleep(test_duration)
+          tester_process.send_signal(signal.SIGINT)
           error_count = 0
           
         except:
@@ -358,11 +356,11 @@ class ScalabilityLauncher(object):
         self.log("results:")
         self.log("%s" %results)
         self.log("%s doc in %s secs = %s docs per hour" %(created_document_number, test_duration, created_document_per_hour_number))
-#        test_result_line_test.stop(stdout=results,
-#                        test_count=created_document_number,
-#                        failure_count=failed_document_number,
-#                        error_count=error_count,
-#                        duration=test_duration)
+        test_result_line_test.stop(stdout=results,
+                        test_count=created_document_number,
+                        failure_count=failed_document_number,
+                        error_count=error_count,
+                        duration=test_duration)
         self.log("Test Case Stopped")
 
     return error_message_set, exit_status
-- 
2.30.9