Index: src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
+++ src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -0,0 +1,118 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * GetNextJobIdOperation.cpp
+ *
+ *  Created on: Feb 16, 2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// boost asio needs specific operator new
+#include <boost/asio.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <boost/bind.hpp>
+#include <iostream>
+#include "Connection.hpp" // Must come before boost/serialization headers.
+#include <boost/serialization/vector.hpp>
+#include "CodePatterns/Info.hpp"
+#include "CodePatterns/Log.hpp"
+#include "ControllerChoices.hpp"
+#include "types.hpp"
+
+#include "Controller/Commands/GetNextJobIdOperation.hpp"
+
+/** Handle connect operation to send number of done jobs.
+ *
+ * \param e error code if something went wrong
+ * \param endpoint_iterator endpoint of the connection
+ */
+void GetNextJobIdOperation::handle_connect(const boost::system::error_code& e,
+    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
+{
+  Info info(__FUNCTION__);
+  if (!e)
+  {
+    // Successfully established connection. Give choice.
+          enum ControllerChoices choice = GetNextJobId;
+    connection_.async_write(choice,
+      boost::bind(&GetNextJobIdOperation::handle_ReceiveNextId, this,
+      boost::asio::placeholders::error));
+  } else if (endpoint_iterator != boost::asio::ip::tcp::resolver::iterator()) {
+    // Try the next endpoint.
+    connection_.socket().close();
+    boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
+    connection_.socket().async_connect(endpoint,
+      boost::bind(&GetNextJobIdOperation::handle_connect, this,
+      boost::asio::placeholders::error, ++endpoint_iterator));
+  } else {
+    // An error occurred. Log it and return. Since we are not starting a new
+    // operation the io_service will run out of work to do and the client will
+    // exit.
+    ELOG(1, e.message());
+  }
+}
+
+/** Callback function when doneJobs have been received.
+ *
+ * \param e error code if something went wrong
+ */
+void GetNextJobIdOperation::handle_ReceiveNextId(const boost::system::error_code& e)
+{
+  Info info(__FUNCTION__);
+  if (!e)
+  {
+    // The connection::async_read() function will automatically
+    // decode the data that is written to the underlying socket.
+    LOG(1, "INFO: Obtaining next available job id ...");
+    connection_.async_read(nextid,
+      boost::bind(&GetNextJobIdOperation::handle_FinishOperation, this,
+      boost::asio::placeholders::error));
+  }
+  else
+  {
+    // An error occurred.
+    ELOG(1, e.message());
+  }
+}
+
+/** Callback function when an operation has been completed.
+ *
+ * \param e error code if something went wrong
+ */
+void GetNextJobIdOperation::handle_FinishOperation(const boost::system::error_code& e)
+{
+  Info info(__FUNCTION__);
+
+  // place id into nextids
+  nextids.push_back(nextid);
+  nextid = JobId::IllegalJob;
+
+  // and finish operation
+  Operation::handle_FinishOperation(e);
+}
+
+/** Getter for nextid.
+ *
+ * \sa checkResults()
+ * \param next available JobId_t
+ */
+size_t GetNextJobIdOperation::getNextId()
+{
+  ASSERT( nextids.size() != (size_t)0,
+      "GetNextJobIdOperation::getNextId() - no next id available.");
+  const JobId_t availableid = nextids.front();
+  nextids.pop_front();
+  return availableid;
+}
Index: src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.hpp
===================================================================
--- src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.hpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
+++ src/Fragmentation/Automation/Controller/Commands/GetNextJobIdOperation.hpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -0,0 +1,60 @@
+/*
+ * GetNextJobIdOperation.hpp
+ *
+ *  Created on: Feb 16, 2012
+ *      Author: heber
+ */
+
+#ifndef FRAGMENTCONTROLLER_GETNEXTJOBIDOPERATION_HPP_
+#define FRAGMENTCONTROLLER_GETNEXTJOBIDOPERATION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <boost/asio.hpp>
+
+#include "Connection.hpp"
+
+#include "Controller/Commands/Operation.hpp"
+#include "JobId.hpp"
+#include "types.hpp"
+
+/** This Operations requests number of present jobs and present results (done
+ * jobs) from the server.
+ *
+ */
+class GetNextJobIdOperation : public Operation  {
+public:
+  /// Constructor for class GetNextJobIdOperation.
+  GetNextJobIdOperation(Connection &_connection) :
+    Operation(std::string("getnextjobid"), _connection),
+    nextid(JobId::IllegalJob)
+  {}
+  /// Destructor for class GetNextJobIdOperation
+  ~GetNextJobIdOperation() {}
+
+public:
+  // virtual function pointer to the connection handler
+  virtual void handle_connect(const boost::system::error_code& e,
+      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
+
+  /// Callback function when doneJobs have been received.
+  void handle_ReceiveNextId(const boost::system::error_code& e);
+
+  /// Getter for nextid
+  size_t getNextId();
+
+protected:
+  /// Callback function when Operations finishes.
+  void handle_FinishOperation(const boost::system::error_code& e);
+
+  /// current jobs left to calculate and currently calculated results
+  std::list<JobId_t> nextids;
+
+  // temporary for receiving another job id
+  JobId_t nextid;
+};
+
+#endif /* FRAGMENTCONTROLLER_GETNEXTJOBIDOPERATION_HPP_ */
Index: src/Fragmentation/Automation/Controller/FragmentController.cpp
===================================================================
--- src/Fragmentation/Automation/Controller/FragmentController.cpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/Controller/FragmentController.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -30,4 +30,5 @@
 #include "Controller/Commands/Operation.hpp"
 #include "Controller/Commands/CheckResultsOperation.hpp"
+#include "Controller/Commands/GetNextJobIdOperation.hpp"
 #include "Controller/Commands/ReceiveJobsOperation.hpp"
 #include "Controller/Commands/SendResultsOperation.hpp"
@@ -48,4 +49,5 @@
   // insert commands into registry
   Commands.registerInstance(new CheckResultsOperation(connection_));
+  Commands.registerInstance(new GetNextJobIdOperation(connection_));
   Commands.registerInstance(new ReceiveJobsOperation(connection_));
   Commands.registerInstance(new SendResultsOperation(connection_));
Index: src/Fragmentation/Automation/ControllerChoices.hpp
===================================================================
--- src/Fragmentation/Automation/ControllerChoices.hpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/ControllerChoices.hpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -18,4 +18,5 @@
 enum ControllerChoices {
   NoOperation,
+  GetNextJobId,
   ReceiveJobs,
   CheckState,
Index: src/Fragmentation/Automation/FragmentScheduler.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentScheduler.cpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/FragmentScheduler.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -68,4 +68,5 @@
   jobInfo((size_t)2, 0),
   choice(NoOperation),
+  globalId(0),
   Exitflag(OkFlag)
 {
@@ -240,4 +241,5 @@
   {
     bool LaunchNewAcceptor = true;
+    LOG(1, "INFO: Received request for operation " << choice << ".");
     // switch over the desired choice read previously
     switch(choice) {
@@ -247,14 +249,23 @@
       break;
     }
+    case GetNextJobId:
+    {
+      const JobId_t nextid = globalId.getNextId();
+      LOG(1, "INFO: Sending next available job id " << nextid << " to controller ...");
+      conn->async_write(nextid,
+        boost::bind(&FragmentScheduler::handle_GetNextJobIdState, this,
+        boost::asio::placeholders::error, conn));
+      break;
+    }
     case ReceiveJobs:
-      {
-        // The connection::async_write() function will automatically
-        // serialize the data structure for us.
-        LOG(1, "INFO: Receiving bunch of jobs from a controller ...");
-        conn->async_read(jobs,
-          boost::bind(&FragmentScheduler::handle_ReceiveJobs, this,
-          boost::asio::placeholders::error, conn));
-        break;
-      }
+    {
+      // The connection::async_write() function will automatically
+      // serialize the data structure for us.
+      LOG(1, "INFO: Receiving bunch of jobs from a controller ...");
+      conn->async_read(jobs,
+        boost::bind(&FragmentScheduler::handle_ReceiveJobs, this,
+        boost::asio::placeholders::error, conn));
+      break;
+    }
     case CheckState:
     {
@@ -350,4 +361,16 @@
 }
 
+/** Controller callback function when checking on state of results.
+ *
+ * \param e error code if something went wrong
+ * \param conn reference with the connection
+ */
+void FragmentScheduler::handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn)
+{
+  Info info(__FUNCTION__);
+  // do nothing
+  LOG(1, "INFO: Sent next available job id.");
+}
+
 /** Controller callback function when result has been received.
  *
Index: src/Fragmentation/Automation/FragmentScheduler.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentScheduler.hpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/FragmentScheduler.hpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -19,6 +19,6 @@
 #include "Connection.hpp"
 #include "ControllerChoices.hpp"
-#include "ControllerChoices.hpp"
 #include "FragmentQueue.hpp"
+#include "GlobalJobId.hpp"
 #include "Jobs/FragmentJob.hpp"
 #include "Results/FragmentResult.hpp"
@@ -75,4 +75,7 @@
   void handle_CheckResultState(const boost::system::error_code& e, connection_ptr conn);
 
+  /// Controller callback function when checking on state of results.
+  void handle_GetNextJobIdState(const boost::system::error_code& e, connection_ptr conn);
+
   /// Controller callback function when result has been received.
   void handle_SendResults(const boost::system::error_code& e, connection_ptr conn);
@@ -109,4 +112,8 @@
   static FragmentJob::ptr NoJob;
 
+  // TODO: replace this instance by a IdPool.
+  //!> global id to give next available job id
+  GlobalJobId globalId;
+
   // Exit flag on program exit
   enum Exitflag_t Exitflag;
Index: src/Fragmentation/Automation/GlobalJobId.cpp
===================================================================
--- src/Fragmentation/Automation/GlobalJobId.cpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/GlobalJobId.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -22,6 +22,6 @@
 #include "GlobalJobId.hpp"
 
-GlobalJobId::GlobalJobId() :
-    JobId(0)
+GlobalJobId::GlobalJobId(const JobId_t _jobid) :
+    JobId(_jobid)
 {}
 
@@ -31,5 +31,5 @@
 JobId_t GlobalJobId::getNextId()
 {
-  setId(getId()+1);
+  setId(getId()+(JobId_t)1);
   return getId();
 }
Index: src/Fragmentation/Automation/GlobalJobId.hpp
===================================================================
--- src/Fragmentation/Automation/GlobalJobId.hpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/GlobalJobId.hpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -19,5 +19,5 @@
 {
 public:
-  GlobalJobId();
+  explicit GlobalJobId(const JobId_t _jobid);
   ~GlobalJobId();
 
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/Makefile.am	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -47,4 +47,5 @@
   Controller/FragmentController.cpp \
   Controller/Commands/CheckResultsOperation.cpp \
+  Controller/Commands/GetNextJobIdOperation.cpp \
   Controller/Commands/Operation.cpp \
   Controller/Commands/ReceiveJobsOperation.cpp \
@@ -60,4 +61,5 @@
   Controller/FragmentController.hpp \
   Controller/Commands/CheckResultsOperation.hpp \
+  Controller/Commands/GetNextJobIdOperation.hpp \
   Controller/Commands/Operation.hpp \
   Controller/Commands/ReceiveJobsOperation.hpp \
Index: src/Fragmentation/Automation/controller.cpp
===================================================================
--- src/Fragmentation/Automation/controller.cpp	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ src/Fragmentation/Automation/controller.cpp	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -39,8 +39,8 @@
 #include "Controller/FragmentController.hpp"
 #include "Controller/Commands/CheckResultsOperation.hpp"
+#include "Controller/Commands/GetNextJobIdOperation.hpp"
 #include "Controller/Commands/ReceiveJobsOperation.hpp"
 #include "Controller/Commands/SendResultsOperation.hpp"
 #include "Controller/Commands/ShutdownOperation.hpp"
-#include "GlobalJobId.hpp"
 #include "Jobs/MPQCCommandJob.hpp"
 #include "Jobs/SystemCommandJob.hpp"
@@ -56,16 +56,51 @@
 };
 
-// TODO: replace this instance by a IdPool owned by controller.
-GlobalJobId globalId;
-
-void createjobs(std::vector<FragmentJob::ptr> &jobs)
-{
-  FragmentJob::ptr testJob( new SystemCommandJob( std::string("cat"), std::string("Nothing"), globalId.getNextId()) );
-  FragmentJob::ptr othertestJob( new SystemCommandJob( std::string("cat"), std::string("Nothing"), globalId.getNextId()) );
+/** Requests an available id from server
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param host address of server
+ * @param service port/service of server
+ */
+void requestid(
+    FragmentController &controller,
+    const std::string &host,
+    const std::string &service)
+{
+  GetNextJobIdOperation *getnextid = static_cast<GetNextJobIdOperation *>(
+      controller.Commands.getByName("getnextjobid"));
+  (*getnextid)(host,service);
+}
+
+/** Returns another available id from a finished GetNextJobIdOperation.
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @return next available id
+ */
+JobId_t getavailableid(FragmentController &controller)
+{
+  GetNextJobIdOperation *getnextid = static_cast<GetNextJobIdOperation *>(
+      controller.Commands.getByName("getnextjobid"));
+  const JobId_t nextid = getnextid->getNextId();
+  LOG(1, "INFO: Next available id is " << nextid << ".");
+  return nextid;
+}
+
+void createjobs(std::vector<FragmentJob::ptr> &jobs, const JobId_t nextid)
+{
+  FragmentJob::ptr testJob( new SystemCommandJob( std::string("cat"), std::string("Nothing"), nextid) );
   jobs.push_back(testJob);
-  jobs.push_back(othertestJob);
-}
-
-void parsejob(std::vector<FragmentJob::ptr> &jobs, const std::string &filename)
+  LOG(1, "INFO: Added one empty SystemCommandJob's.");
+}
+
+/** Creates a MPQCCommandJob with argument \a filename.
+ *
+ * @param jobs created job is added to this vector
+ * @param filename filename being argument to job
+ * @param nextid id for this job
+ */
+void parsejob(
+    std::vector<FragmentJob::ptr> &jobs,
+    const std::string &filename,
+    const JobId_t nextid)
 {
   std::ifstream file;
@@ -74,5 +109,5 @@
   std::string output((std::istreambuf_iterator<char>(file)),
       std::istreambuf_iterator<char>());
-  FragmentJob::ptr testJob( new MPQCCommandJob(output, globalId.getNextId()) );
+  FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid) );
   jobs.push_back(testJob);
   file.close();
@@ -80,5 +115,12 @@
 }
 
-void addjobs(FragmentController &controller, std::vector<FragmentJob::ptr> &jobs)
+/** Adds a vector of jobs to the send operation.
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param jobs jobs to add
+ */
+void addjobs(
+    FragmentController &controller,
+    std::vector<FragmentJob::ptr> &jobs)
 {
   ReceiveJobsOperation *recjobs = static_cast<ReceiveJobsOperation *>(
@@ -87,5 +129,14 @@
 }
 
-void sendjobs(FragmentController &controller, const std::string &host, const std::string &service)
+/** Sends contained jobs in operation to server
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param host address of server
+ * @param service port/service of server
+ */
+void sendjobs(
+    FragmentController &controller,
+    const std::string &host,
+    const std::string &service)
 {
   ReceiveJobsOperation *recjobs = static_cast<ReceiveJobsOperation *>(
@@ -94,5 +145,14 @@
 }
 
-void checkresults(FragmentController &controller, const std::string &host, const std::string &service)
+/** Obtains scheduled and done jobs from server
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param host address of server
+ * @param service port/service of server
+ */
+void checkresults(
+    FragmentController &controller,
+    const std::string &host,
+    const std::string &service)
 {
   CheckResultsOperation *checkres = static_cast<CheckResultsOperation *>(
@@ -101,4 +161,8 @@
 }
 
+/** Prints scheduled and done jobs.
+ *
+ * @param controller FragmentController with CommandRegistry
+ */
 void printdonejobs(FragmentController &controller)
 {
@@ -110,5 +174,14 @@
 }
 
-void receiveresults(FragmentController &controller, const std::string &host, const std::string &service)
+/** Obtains results from done jobs from server.
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param host address of server
+ * @param service port/service of server
+ */
+void receiveresults(
+    FragmentController &controller,
+    const std::string &host,
+    const std::string &service)
 {
   SendResultsOperation *sendres = static_cast<SendResultsOperation *>(
@@ -117,4 +190,8 @@
 }
 
+/** Print received results.
+ *
+ * @param controller FragmentController with CommandRegistry
+ */
 void printreceivedresults(FragmentController &controller)
 {
@@ -127,5 +204,14 @@
 }
 
-void shutdown(FragmentController &controller, const std::string &host, const std::string &service)
+/** Sends shutdown signal to server
+ *
+ * @param controller FragmentController with CommandRegistry
+ * @param host address of server
+ * @param service port/service of server
+ */
+void shutdown(
+    FragmentController &controller,
+    const std::string &host,
+    const std::string &service)
 {
   ShutdownOperation *shutdown = static_cast<ShutdownOperation *>(
@@ -183,14 +269,57 @@
     FragmentController controller(io_service);
 
+    // Initial phase: information gathering from server
+
     switch(getCommandIndex(CommandsMap, argv[3])) {
       case AddJobsIndex:
       {
+        if (argc < 5) {
+          ELOG(1, "Please add a filename for the MPQCCommandJob.");
+        } else {
+          // get an id for every filename
+          for (int argcount = 4; argcount < argc; ++argcount) {
+            requestid(controller, argv[1], argv[2]);
+          }
+        }
+        break;
+      }
+      case CreateJobsIndex:
+      {
+        requestid(controller, argv[1], argv[2]);
+        break;
+      }
+      case CheckResultsIndex:
+        break;
+      case ReceiveResultsIndex:
+        break;
+      case ShutdownIndex:
+        break;
+      case UnknownCommandIndex:
+      default:
+        ELOG(1, "Unrecognized command '"+toString(argv[3])+"'.");
+        break;
+    }
+
+    {
+      io_service.reset();
+      Info info("io_service: Phase One");
+      io_service.run();
+    }
+
+    // Second phase: Building jobs and sending information to server
+
+    switch(getCommandIndex(CommandsMap, argv[3])) {
+      case AddJobsIndex:
+      {
         std::vector<FragmentJob::ptr> jobs;
-        if (argc == 4) {
+        if (argc < 5) {
           ELOG(1, "Please add a filename for the MPQCCommandJob.");
         } else {
           for (int argcount = 4; argcount < argc; ++argcount) {
-            LOG(1, "INFO: Parsing job for file " << argv[argcount] << ".");
-            parsejob(jobs, argv[argcount]);
+            const JobId_t next_id = getavailableid(controller);
+            const std::string filename(argv[argcount]);
+            LOG(1, "INFO: Creating MPQCCommandJob with filename'"
+                +filename+"', and id "+toString(next_id)+".");
+            parsejob(jobs, filename, next_id);
           }
           addjobs(controller, jobs);
@@ -202,5 +331,6 @@
       {
         std::vector<FragmentJob::ptr> jobs;
-        createjobs(jobs);
+          const JobId_t next_id = getavailableid(controller);
+          createjobs(jobs, next_id);
         addjobs(controller, jobs);
         sendjobs(controller, argv[1], argv[2]);
@@ -229,7 +359,10 @@
 
     {
-      Info info("io_service");
+      io_service.reset();
+      Info info("io_service: Phase Two");
       io_service.run();
     }
+
+    // Final phase: Print result of command
 
     switch(getCommandIndex(CommandsMap, argv[3])) {
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-addingjobs.at	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -15,8 +15,7 @@
 # add two jobs via JobAdder
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs], 0, [stdout], [ignore], [kill $server_pid])
-AT_CHECK([fgrep "Sending 2 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
 
-# work on jobs
-AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Worker 127.0.0.1 $WORKERPORT], 0, [ignore], [ignore], [kill $server_pid])
+# work on job
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Worker 127.0.0.1 $WORKERPORT], 0, [ignore], [ignore], [kill $server_pid])
 
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-completerun.at	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -15,5 +15,7 @@
 # add two jobs via JobAdder
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs], 0, [stdout], [ignore], [kill $server_pid])
-AT_CHECK([fgrep "Sending 2 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs], 0, [stdout], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "Sending 1 jobs ..." stdout], 0, [ignore], [ignore], [kill $server_pid])
 # Checking results
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
Index: tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at
===================================================================
--- tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at	(revision 6f2bc74265e4dfd79255657a1db5cc52e9511f44)
+++ tests/regression/Fragmentation/Automation/testsuite-fragmentation-automation-server-worker.at	(revision d1dbfc5f3d703923f09bc57a4a3e7b6f4f8e6bc8)
@@ -13,5 +13,5 @@
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
 
-# add two jobs 
+# add one jobs 
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT createjobs], 0, [ignore], [ignore], [kill $server_pid])
 
@@ -20,11 +20,7 @@
 AT_CHECK([fgrep "Job id: 1" stdout], 0, [ignore], [ignore], [kill $server_pid])
 
-# second worker has a job
-AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Worker 127.0.0.1 $WORKERPORT], 0, [stdout], [ignore], [kill $server_pid])
-AT_CHECK([fgrep "Job id: 2" stdout], 0, [ignore], [ignore], [kill $server_pid])
-
 # check number of done jobs 
 AT_CHECK([${AUTOTEST_PATH}/Fragmentation/Automation/Controller 127.0.0.1 $CONTROLLERPORT checkresults], 0, [stdout], [ignore], [kill $server_pid])
-AT_CHECK([fgrep "2 jobs are calculated so far" stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "1 jobs are calculated so far" stdout], 0, [ignore], [ignore], [kill $server_pid])
 
 # shutdown controller socket 
