From de6e9d4ab5926545f98576c91d3b49d4d4b38482 Mon Sep 17 00:00:00 2001 From: henricasanova Date: Thu, 30 Nov 2017 13:50:27 -1000 Subject: [PATCH] Documentation fix --- .../services/file_registry/FileRegistryService.h | 13 ++++++++++++- test/simulation/OneTaskTest.cpp | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/wrench/services/file_registry/FileRegistryService.h b/include/wrench/services/file_registry/FileRegistryService.h index ac4cc65f07..6f2cf3a8fa 100644 --- a/include/wrench/services/file_registry/FileRegistryService.h +++ b/include/wrench/services/file_registry/FileRegistryService.h @@ -21,7 +21,7 @@ namespace wrench { class WorkflowFile; class StorageService; - + /** * @brief A file registry service (a.k.a. replica catalog) */ @@ -46,16 +46,26 @@ namespace wrench { public: + // Public Constructor FileRegistryService(std::string hostname, std::map = {}); + /****************************/ + /** \cond DEVELOPER */ + /****************************/ + std::set lookupEntry(WorkflowFile *file); void addEntry(WorkflowFile *file, StorageService *storage_service); void removeEntry(WorkflowFile *file, StorageService *storage_service); + /****************************/ + /** \endcond */ + /****************************/ + + /****************************/ /** \cond INTERNAL */ /****************************/ @@ -86,6 +96,7 @@ namespace wrench { }; + }; diff --git a/test/simulation/OneTaskTest.cpp b/test/simulation/OneTaskTest.cpp index 10b2bfc0a1..3ed0017155 100644 --- a/test/simulation/OneTaskTest.cpp +++ b/test/simulation/OneTaskTest.cpp @@ -247,6 +247,17 @@ class ExecutionWithLocationMapTestWMS : public wrench::WMS { throw std::runtime_error("Shouldn't be able to add nullptr entry in the File Registry Service"); } + /* Do a bogus remove entry of the file registry service */ + success = true; + try { + this->simulation->getFileRegistryService()->removeEntry(nullptr, nullptr); + } catch (std::invalid_argument &e) { + success = false; + } + if (success) { + throw std::runtime_error("Shouldn't be able to remove nullptr entry in the File Registry Service"); + } + // Terminate