[fdo-commits] r783 -
branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Wed Mar 7 12:20:00 EST 2007
Author: brentrobinson
Date: 2007-03-07 12:20:00 -0500 (Wed, 07 Mar 2007)
New Revision: 783
Modified:
branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h
Log:
fixed TestLT
Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp 2007-03-07 16:56:20 UTC (rev 782)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp 2007-03-07 17:20:00 UTC (rev 783)
@@ -73,12 +73,6 @@
#ifdef RDBI_DEF_SSQL
mCanAddNotNullCol = false;
#endif
-/*
- if ( strcmp(UnitTestUtil::GetEnv("ltmethod", "-1"), "0") == 0 )
- mIsOWM = false;
- else
- mIsOWM = true;
-*/
try {
FdoSchemaManagerP mgr;
const FdoSmLpSchemaCollection* lp = NULL;
@@ -349,11 +343,6 @@
#ifdef RDBI_DEF_SSQL
mCanAddNotNullCol = false;
#endif
- // Oracle-specific settings:
- if ( strcmp(UnitTestUtil::GetEnv("ltmethod", "-1"), "0") == 0 )
- mIsOWM = false;
- else
- mIsOWM = true;
mDatastore = UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_SUFFIX);
@@ -786,11 +775,6 @@
FdoPtr<FdoIConnection> connection;
StaticConnection* staticConn = NULL;
- if ( strcmp(UnitTestUtil::GetEnv("ltmethod", "-1"), "0") == 0 )
- mIsOWM = false;
- else
- mIsOWM = true;
-
mDatastore = UnitTestUtil::GetEnviron("datastore", DB_NAME_OVERRIDE_DEFAULT_SUFFIX);
try {
@@ -890,11 +874,6 @@
{
FdoPtr<FdoIConnection> connection;
- if ( strcmp(UnitTestUtil::GetEnv("ltmethod", "-1"), "0") == 0 )
- mIsOWM = false;
- else
- mIsOWM = true;
-
try {
// delete, re-create and open the datastore
printf( "Initializing Connection ... \n" );
@@ -5829,46 +5808,40 @@
void FdoApplySchemaTest::StartLongTransaction( FdoIConnection* connection, FdoStringP transName )
{
- if ( mIsOWM ) {
- FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
- gettrans->SetName( GenLtName(transName) );
- FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
+ FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
+ gettrans->SetName( GenLtName(transName) );
+ FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
- if ( rdr->ReadNext() == 0 ) {
- FdoPtr<FdoICreateLongTransaction> crtrans = (FdoICreateLongTransaction *) connection->CreateCommand(FdoCommandType_CreateLongTransaction);
- crtrans->SetName( GenLtName(transName) );
- crtrans->Execute();
- }
+ if ( rdr->ReadNext() == 0 ) {
+ FdoPtr<FdoICreateLongTransaction> crtrans = (FdoICreateLongTransaction *) connection->CreateCommand(FdoCommandType_CreateLongTransaction);
+ crtrans->SetName( GenLtName(transName) );
+ crtrans->Execute();
+ }
- rdr = NULL;
+ rdr = NULL;
- FdoPtr<FdoIActivateLongTransaction> acttrans = (FdoIActivateLongTransaction *) connection->CreateCommand(FdoCommandType_ActivateLongTransaction);
- acttrans->SetName( GenLtName(transName) );
- acttrans->Execute();
- }
+ FdoPtr<FdoIActivateLongTransaction> acttrans = (FdoIActivateLongTransaction *) connection->CreateCommand(FdoCommandType_ActivateLongTransaction);
+ acttrans->SetName( GenLtName(transName) );
+ acttrans->Execute();
}
void FdoApplySchemaTest::EndLongTransaction( FdoIConnection* connection )
{
- if ( mIsOWM ) {
- FdoPtr<FdoIDeactivateLongTransaction> deacttrans = (FdoIDeactivateLongTransaction *) connection->CreateCommand(FdoCommandType_DeactivateLongTransaction);
- deacttrans->Execute();
- }
+ FdoPtr<FdoIDeactivateLongTransaction> deacttrans = (FdoIDeactivateLongTransaction *) connection->CreateCommand(FdoCommandType_DeactivateLongTransaction);
+ deacttrans->Execute();
}
void FdoApplySchemaTest::RollbackLongTransaction( FdoIConnection* connection, FdoStringP transName )
{
- if ( mIsOWM ) {
- FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
- gettrans->SetName( GenLtName(transName) );
- FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
+ FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
+ gettrans->SetName( GenLtName(transName) );
+ FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
- if ( rdr->ReadNext() != 0 ) {
- rdr = NULL;
- FdoPtr<FdoIRollbackLongTransaction> rbtrans = (FdoIRollbackLongTransaction *) connection->CreateCommand(FdoCommandType_RollbackLongTransaction);
- rbtrans->SetName( GenLtName(transName) );
- rbtrans->Execute();
- }
+ if ( rdr->ReadNext() != 0 ) {
+ rdr = NULL;
+ FdoPtr<FdoIRollbackLongTransaction> rbtrans = (FdoIRollbackLongTransaction *) connection->CreateCommand(FdoCommandType_RollbackLongTransaction);
+ rbtrans->SetName( GenLtName(transName) );
+ rbtrans->Execute();
}
}
@@ -5876,15 +5849,13 @@
{
FdoStringP activeLT;
- if ( mIsOWM ) {
- FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
- FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
+ FdoPtr<FdoIGetLongTransactions> gettrans = (FdoIGetLongTransactions *) connection->CreateCommand(FdoCommandType_GetLongTransactions);
+ FdoPtr<FdoILongTransactionReader> rdr = gettrans->Execute();
- while ( rdr->ReadNext() != 0 ) {
- if ( rdr->IsActive() ) {
- activeLT = rdr->GetName();
- break;
- }
+ while ( rdr->ReadNext() != 0 ) {
+ if ( rdr->IsActive() ) {
+ activeLT = rdr->GetName();
+ break;
}
}
Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h 2007-03-07 16:56:20 UTC (rev 782)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.h 2007-03-07 17:20:00 UTC (rev 783)
@@ -190,7 +190,6 @@
virtual FdoStringP LogicalPhysicalBend( FdoString* inFile );
virtual FdoStringP LogicalPhysicalFormat( FdoString* inFile );
- bool mIsOWM;
bool mCanAddNotNullCol;
FdoStringP mDatastore;
bool mIsLowerDatastoreName;
More information about the fdo-commits
mailing list