Diff of /test/plugins/tasks/DownloadTaskTest.cpp [316a27] .. [c5ae6f]  Maximize  Restore

  Switch to side-by-side view

--- a/test/plugins/tasks/DownloadTaskTest.cpp
+++ b/test/plugins/tasks/DownloadTaskTest.cpp
@@ -8,8 +8,10 @@
 #include <cstdlib>
 #include "org/esb/core/PluginRegistry.h"
 #include "org/esb/core/Task.h"
+#include "org/esb/core/TaskException.h"
 
 #include "org/esb/util/Log.h"
+#include "org/esb/config/config.h"
 using namespace std;
 
 /*
@@ -22,14 +24,19 @@
   std::map<std::string, std::string> cfg;
   cfg["downloadtask.src"]="http://www.google.de";
   cfg["downloadtask.trg"]="/tmp/index.html";
-  {
-    Ptr<org::esb::core::Task> task = org::esb::core::PluginRegistry::getInstance()->createTask("DownloadTask", cfg);
+  try{
+    Ptr<org::esb::core::Task> task = org::esb::core::PluginRegistry::getInstance()->createTask("InputTask", cfg);
     if (task) {
       task->prepare();
       task->execute();
+    }else{
+      LOGDEBUG("task not found");
     }
+  }catch(const org::esb::core::TaskException & ex){
+    LOGERROR(ex.displayText());
   }
   org::esb::core::PluginRegistry::close();
+  org::esb::config::Config::close();
   return 0;
 }
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks