Browse Source

BeyondJ needed to return

msmith-techempower 8 years ago
parent
commit
c7a5e4275a

+ 1 - 2
frameworks/Java/beyondj/setup.sh

@@ -13,5 +13,4 @@ fw_get -O http://beyondj.com/beyondj-launcher-1.0-SNAPSHOT.jar
 cd ../../
 
 echo "Launching BeyondJ from location:$PWD"
-java -jar beyondj-launcher/deploy/beyondj-launcher-1.0-SNAPSHOT.jar system.platform.dbserver=${DBHOST} numInstances=10
-
+java -jar beyondj-launcher/deploy/beyondj-launcher-1.0-SNAPSHOT.jar system.platform.dbserver=${DBHOST} numInstances=10 &

+ 7 - 7
toolset/benchmark/benchmarker.py

@@ -573,9 +573,9 @@ class Benchmarker:
           print "Error: Unable to recover port, cannot start test"
           return exit_with_code(1)
 
-        result, ppid = test.start(out)
+        result = test.start(out)
         if result != 0:
-          self.__stop_test(ppid, out)
+          self.__stop_test(out)
           time.sleep(5)
           out.write( "ERROR: Problem starting {name}\n".format(name=test.name) )
           out.flush()
@@ -613,13 +613,13 @@ class Benchmarker:
         ##########################
         out.write(header("Stopping %s" % test.name))
         out.flush()
-        self.__stop_test(ppid, out)
+        self.__stop_test(out)
         out.flush()
         time.sleep(15)
 
         if self.__is_port_bound(test.port):
           # This can happen sometimes - let's try again
-          self.__stop_test(ppid, out)
+          self.__stop_test(out)
           out.flush()
           time.sleep(15)
           if self.__is_port_bound(test.port):
@@ -664,7 +664,7 @@ class Benchmarker:
         traceback.print_exc(file=out)
         out.flush()
         try:
-          self.__stop_test(ppid, out)
+          self.__stop_test(out)
         except (subprocess.CalledProcessError) as e:
           self.__write_intermediate_results(test.name,"<setup.py>#stop() raised an error")
           out.write(header("Subprocess Error: Test .stop() raised exception %s" % test.name))
@@ -675,7 +675,7 @@ class Benchmarker:
       # TODO - subprocess should not catch this exception!
       # Parent process should catch it and cleanup/exit
       except (KeyboardInterrupt) as e:
-        self.__stop_test(ppid, out)
+        self.__stop_test(out)
         out.write(header("Cleaning up..."))
         out.flush()
         self.__finish()
@@ -692,7 +692,7 @@ class Benchmarker:
   # __stop_test(benchmarker)
   # Stops all running tests
   ############################################################
-  def __stop_test(self, ppid, out):
+  def __stop_test(self, out):
     # Find the PID of the daemon (and remove trailing newline)
     pid = subprocess.check_output(['pgrep','TFBReaper']).strip()
     # Kill the children

+ 1 - 2
toolset/benchmark/framework_test.py

@@ -251,7 +251,6 @@ class FrameworkTest:
           cwd=self.directory,
           stdout=subprocess.PIPE,
           stderr=subprocess.STDOUT)
-    pid = p.pid
     nbsr = setup_util.NonBlockingStreamReader(p.stdout,
       "%s: %s.sh and framework processes have terminated" % (self.name, self.setup_file))
 
@@ -348,7 +347,7 @@ class FrameworkTest:
     logging.info("Executed %s.sh, returning %s", self.setup_file, retcode)
     os.chdir(previousDir)
 
-    return retcode, pid
+    return retcode
   ############################################################
   # End start
   ############################################################