4084: Split out behavior of updating job subscribe list to
[arvados.git] / apps / workbench / test / test_helper.rb
index c0d6ac86e72d907c6c05042b9663dded72419d37..e3654877afe2c857829aafb2310909abbf5ae930 100644 (file)
@@ -128,8 +128,13 @@ class ApiServerForTests
 
   def find_server_pid
     pid = nil
+    @pidfile = if @websocket
+                 WEBSOCKET_PID_PATH
+               else
+                 SERVER_PID_PATH
+               end
     begin
-      pid = IO.read(if @websocket then WEBSOCKET_PID_PATH else SERVER_PID_PATH end).to_i
+      pid = IO.read(@pidfile).to_i
       $stderr.puts "API server is running, pid #{pid.inspect}"
     rescue Errno::ENOENT
     end