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