changeset 27:173176f8cef2

jobs branch has disappeared in orthanc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 14 Jul 2018 13:18:31 +0200
parents 19eec364236b
children c0cb5d2cd696
files Framework/Plugins/IndexUnitTests.h MySQL/CMakeLists.txt PostgreSQL/CMakeLists.txt SQLite/CMakeLists.txt
diffstat 4 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Plugins/IndexUnitTests.h	Thu Jul 12 21:26:08 2018 +0200
+++ b/Framework/Plugins/IndexUnitTests.h	Sat Jul 14 13:18:31 2018 +0200
@@ -144,7 +144,6 @@
 
   db.RegisterOutput(new OrthancPlugins::DatabaseBackendOutput(&context, NULL));
   db.Open();
-  db.StartTransaction();
   
 
   std::string s;
@@ -381,7 +380,16 @@
 
   ASSERT_EQ(0u, db.GetUnprotectedPatientsCount());  // No patient was inserted
   ASSERT_TRUE(db.IsExistingResource(c));
-  db.DeleteResource(c);
+
+  {
+    // A transaction is needed here for MySQL, as it was not possible
+    // to implement recursive deletion of resources using pure SQL
+    // statements
+    db.StartTransaction();    
+    db.DeleteResource(c);
+    db.CommitTransaction();
+  }
+  
   ASSERT_FALSE(db.IsExistingResource(c));
   ASSERT_TRUE(db.IsExistingResource(a));
   ASSERT_TRUE(db.IsExistingResource(b));
@@ -415,6 +423,4 @@
   db.DeleteResource(p2);
   ASSERT_TRUE(db.SelectPatientToRecycle(r, p3));
   ASSERT_EQ(p1, r);
-
-  db.CommitTransaction();
 }
--- a/MySQL/CMakeLists.txt	Thu Jul 12 21:26:08 2018 +0200
+++ b/MySQL/CMakeLists.txt	Sat Jul 14 13:18:31 2018 +0200
@@ -6,9 +6,8 @@
 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
   set(ORTHANC_FRAMEWORK_VERSION "mainline")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
-  set(ORTHANC_FRAMEWORK_BRANCH "jobs")  # TODO remove this
 else()
-  set(ORTHANC_FRAMEWORK_VERSION "1.3.2")
+  set(ORTHANC_FRAMEWORK_VERSION "1.4.0")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
 endif()
 
--- a/PostgreSQL/CMakeLists.txt	Thu Jul 12 21:26:08 2018 +0200
+++ b/PostgreSQL/CMakeLists.txt	Sat Jul 14 13:18:31 2018 +0200
@@ -6,9 +6,8 @@
 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
   set(ORTHANC_FRAMEWORK_VERSION "mainline")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
-  set(ORTHANC_FRAMEWORK_BRANCH "jobs")  # TODO remove this
 else()
-  set(ORTHANC_FRAMEWORK_VERSION "1.3.2")
+  set(ORTHANC_FRAMEWORK_VERSION "1.4.0")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
 endif()
 
--- a/SQLite/CMakeLists.txt	Thu Jul 12 21:26:08 2018 +0200
+++ b/SQLite/CMakeLists.txt	Sat Jul 14 13:18:31 2018 +0200
@@ -6,9 +6,8 @@
 if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
   set(ORTHANC_FRAMEWORK_VERSION "mainline")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
-  set(ORTHANC_FRAMEWORK_BRANCH "jobs")  # TODO remove this
 else()
-  set(ORTHANC_FRAMEWORK_VERSION "1.3.2")
+  set(ORTHANC_FRAMEWORK_VERSION "1.4.0")
   set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
 endif()