diff --git a/OnlineDB/Oracle/test/test.cpp b/OnlineDB/Oracle/test/test.cpp index f3242fc87fbc5..4b54db1d7cd01 100644 --- a/OnlineDB/Oracle/test/test.cpp +++ b/OnlineDB/Oracle/test/test.cpp @@ -7,32 +7,33 @@ using namespace oracle::occi; using namespace std; -int main(int argc, char *argv[]){ +int main(int argc, char* argv[]) { + const char* fake_db = "cms-fake-unknown-db-server-1234567890"; + char* p = std::getenv("CMSTEST_FAKE_ORACLE_DBNAME"); + fake_db = p ? p : fake_db; int errCode = 0; - if (argc==2){errCode = stoi(argv[1]);} - if (errCode==24960){ - cout <<"Tesing: 'ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255'"<createConnection("a", "b", "c"); + auto conn = env->createConnection("a", "b", fake_db); env->terminateConnection(conn); Environment::terminateEnvironment(env); - }catch(oracle::occi::SQLException &e) - { - cout <<"Caught oracle::occi::SQLException exception with error code: "<