Remove some objectstore dependencies outside scheduler
While making some test builds for the postgres scheduler DB (e.g. issue #147 (closed)) I noticed a few the give failures during the build, most appear strightward, but do need to check osmReaderTest fix. Current changes needed to let the build run (when the postgres scheduler is selected) are:
diff --git a/frontend/common/AdminCmd.cpp b/frontend/common/AdminCmd.cpp
index 431feab..80db277 100644
--- a/frontend/common/AdminCmd.cpp
+++ b/frontend/common/AdminCmd.cpp
@@ -15,6 +15,7 @@
* submit itself to any jurisdiction.
*/
+#include "catalogue/Catalogue.hpp"
#include "catalogue/CreateMountPolicyAttributes.hpp"
#include "catalogue/CreateTapeAttributes.hpp"
#include "catalogue/MediaType.hpp"
diff --git a/frontend/common/FrontendService.cpp b/frontend/common/FrontendService.cpp
index 4ed101b..99359f1 100644
--- a/frontend/common/FrontendService.cpp
+++ b/frontend/common/FrontendService.cpp
@@ -27,6 +27,8 @@
#include "FrontendService.hpp"
#include "Config.hpp"
+#include <fstream>
+
namespace cta {
namespace frontend {
diff --git a/frontend/common/WorkflowEvent.cpp b/frontend/common/WorkflowEvent.cpp
index 9df5f16..79e6869 100644
--- a/frontend/common/WorkflowEvent.cpp
+++ b/frontend/common/WorkflowEvent.cpp
@@ -15,6 +15,7 @@
* submit itself to any jurisdiction.
*/
+#include "catalogue/Catalogue.hpp"
#include "common/checksum/ChecksumBlobSerDeser.hpp"
#include "PbException.hpp"
#include "WorkflowEvent.hpp"
diff --git a/tapeserver/castor/tape/tapeserver/file/OsmReaderTest.cpp b/tapeserver/castor/tape/tapeserver/file/OsmReaderTest.cpp
index 4340faf..d0f1786 100644
--- a/tapeserver/castor/tape/tapeserver/file/OsmReaderTest.cpp
+++ b/tapeserver/castor/tape/tapeserver/file/OsmReaderTest.cpp
@@ -34,8 +34,13 @@
#include "common/log/StdoutLogger.hpp"
#include "common/log/StringLogger.hpp"
#include "common/processCap/ProcessCapDummy.hpp"
-#include "scheduler/OStoreDB/OStoreDBFactory.hpp"
#include "scheduler/RetrieveJob.hpp"
+#ifdef CTA_PGSCHED
+#include "scheduler/PostgresSchedDB/PostgresSchedDBInit.hpp"
+#else
+#include "scheduler/OStoreDB/OStoreDBInit.hpp"
+#include "scheduler/OStoreDB/OStoreDBWithAgent.hpp"
+#endif
namespace {
std::string g_device_name;
@@ -70,7 +75,7 @@ public:
class OsmReaderTest : public ::testing::Test {
protected:
OsmReaderTest() : m_sWrapper(), m_dev(), m_catalogue(std::make_unique<OSMCatalogue>()) {
- cta::OStoreDBFactory<cta::objectstore::BackendVFS> factory;
+// cta::OStoreDBFactory<cta::objectstore::BackendVFS> factory;
}
void SetUp() override {
@@ -202,4 +207,4 @@ int main(int argc, char **argv) {
g_device_path = argv[2];
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}
diff --git a/tapeserver/daemon/MaintenanceHandler.cpp b/tapeserver/daemon/MaintenanceHandler.cpp
index 4c2d590..97c71c6 100644
--- a/tapeserver/daemon/MaintenanceHandler.cpp
+++ b/tapeserver/daemon/MaintenanceHandler.cpp
@@ -26,7 +26,7 @@
#include "rdbms/Login.hpp"
#include "scheduler/DiskReportRunner.hpp"
#include "scheduler/RepackRequestManager.hpp"
-#include "objectstore/QueueCleanupRunner.hpp"
+// #include "objectstore/QueueCleanupRunner.hpp"
#include "scheduler/Scheduler.hpp"
#include "tapeserver/daemon/MaintenanceHandler.hpp"
Edited by David Smith