Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IndexUnitTests.h @ 28:c0cb5d2cd696
checks depending on Orthanc version
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 16 Jul 2018 14:48:43 +0200 |
parents | 173176f8cef2 |
children | 714c5d2bee76 |
comparison
equal
deleted
inserted
replaced
27:173176f8cef2 | 28:c0cb5d2cd696 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../Common/ImplicitTransaction.h" | |
25 | |
24 #include <orthanc/OrthancCDatabasePlugin.h> | 26 #include <orthanc/OrthancCDatabasePlugin.h> |
25 #include <OrthancServer/ServerEnumerations.h> | 27 #include <OrthancServer/ServerEnumerations.h> |
26 | 28 |
27 #include <gtest/gtest.h> | 29 #include <gtest/gtest.h> |
28 #include <list> | 30 #include <list> |
127 OrthancPluginContext context; | 129 OrthancPluginContext context; |
128 context.pluginsManager = NULL; | 130 context.pluginsManager = NULL; |
129 context.orthancVersion = "mainline"; | 131 context.orthancVersion = "mainline"; |
130 context.Free = ::free; | 132 context.Free = ::free; |
131 context.InvokeService = InvokeService; | 133 context.InvokeService = InvokeService; |
134 | |
135 ImplicitTransaction::SetErrorOnDoubleExecution(true); | |
132 | 136 |
133 #if ORTHANC_ENABLE_POSTGRESQL == 1 | 137 #if ORTHANC_ENABLE_POSTGRESQL == 1 |
134 PostgreSQLIndex db(globalParameters_); | 138 PostgreSQLIndex db(globalParameters_); |
135 db.SetClearAll(true); | 139 db.SetClearAll(true); |
136 #elif ORTHANC_ENABLE_MYSQL == 1 | 140 #elif ORTHANC_ENABLE_MYSQL == 1 |