Commit 92d0d6fd authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Final touch before moving test_Regression to using the driver too


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@20088 4525493e-7705-40b1-a816-d608a930855b
parent 10c3aa32
......@@ -100,9 +100,9 @@ if __name__ == '__main__':
if 'ReferenceDbMgr' in dir():
###print 'DEBUG: Instantiate a', refSchemaVersion, 'ref db manager'
mgr = ReferenceDbMgr( refSchemaVersion )
###print 'DEBUG: Drop database', connectString
###print 'DEBUG: Drop and recreate reference database'
###print 'DEBUG: -> db ID:', connectString
mgr.dropReferenceDb( connectString )
###print 'DEBUG: Create', refSchemaVersion, 'ref db', connectString
mgr.createReferenceDb( connectString )
# Stop here if there is nothing else to do
if 'TestReferenceDb1RO' not in dir() and 'TestReferenceDb1RW' not in dir() and 'TestReferenceDb2RO' not in dir():
......
......@@ -27,6 +27,8 @@ except: serviceVersion290 = False
envKey = "COOLTESTDB"
envKeyR = "COOLTESTDB_R"
# TODO: parameter for createdb in driver...
##############################################################################
def usage() :
......@@ -80,6 +82,46 @@ if __name__ == '__main__':
print 'ERROR! Optionally you can set also %s'%(envKeyR)
sys.exit(-1)
# Debug printout for bug #32362 (schema evolution test on Win nightlies)
###print 'DEBUG: PYTHONPATH =', os.environ["PYTHONPATH"]
# Debug printout for bug #45732 (schema evolution tests use wrong C++?)
###if "LD_LIBRARY_PATH" in os.environ:
### print 'DEBUG: LD_LIBRARY_PATH =', os.environ["LD_LIBRARY_PATH"]
#=== 0: CONFIGURE REFERENCE
# Disable replica failover in CORAL to prevent silent test failures against
# CoralServer or Frontier when these are not available, otherwise the R/O
# test is executed succesfully against Oracle (CORALCOOL-2120). Disabling
# failover is a better fix than the older patch using CoolAuthentication,
# which was broken if COOLTESTDB_R is defined (CORALCOOL-2917).
#print 'DEBUG: Instantiate a', refSchemaVersion, 'reference db manager'
mgr = ReferenceDbMgr( refSchemaVersion )
mgr.app.connectionSvc().configuration().disableReplicaFailOver()
#print 'DEBUG: Drop and recreate reference database'
#print 'DEBUG: -> db ID:', connectString
mgr.dropReferenceDb( connectString ) # COMMENT OUT TO SKIP DB RECREATE
mgr.createReferenceDb( connectString ) # COMMENT OUT TO SKIP DB RECREATE
# No need to check the R/W connection string (see below), use it as-is.
if 'ReferenceDbMgr' in dir():
###print 'Instantiate a', refSchemaVersion, 'reference database manager'
mgr = ReferenceDbMgr( refSchemaVersion )
###print 'Drop database', connectString
mgr.dropReferenceDb( connectString )
###print 'Create', refSchemaVersion, 'reference database', connectString
mgr.createReferenceDb( connectString )
# Stop here if there is nothing else to do
if 'TestReferenceDb1RO' not in dir() and 'TestReferenceDb1RW' not in dir() and 'TestReferenceDb2RO' not in dir():
sys.exit(0)
elif 'TestReferenceDb1RO' not in dir() and 'TestReferenceDb1RW' not in dir() and 'TestReferenceDb2RO' not in dir():
print "WARNING! No module was loaded, there is nothing to do"
sys.exit(0)
# No need to check the R/W connection string. Check only the R/O connection
# string: if it is a Frontier or CoralServer connection, then grant Oracle
# reader privileges to public; in addition refresh the server cache if this
......@@ -118,20 +160,6 @@ if __name__ == '__main__':
else:
print 'DEBUG: Not a Frontier replica: no cache to refresh'
# Disable replica failover in CORAL to prevent silent test failures against
# CoralServer or Frontier when these are not available, otherwise the R/O
# test is executed succesfully against Oracle (CORALCOOL-2120). Disabling
# failover is a better fix than the older patch using CoolAuthentication,
# which was broken if COOLTESTDB_R is defined (CORALCOOL-2917).
#print 'DEBUG: Instantiate a', refSchemaVersion, 'reference db manager'
mgr = ReferenceDbMgr( refSchemaVersion )
mgr.app.connectionSvc().configuration().disableReplicaFailOver()
#print 'DEBUG: Drop and recreate reference database'
#print 'DEBUG: -> db ID:', connectString
mgr.dropReferenceDb( connectString ) # COMMENT OUT TO SKIP DB RECREATE
mgr.createReferenceDb( connectString ) # COMMENT OUT TO SKIP DB RECREATE
# If R/O replica is a Frontier or CoralServer connection,
# then grant Oracle reader privileges to public.
if replRO.find('frontier') == 0 or replRO.find('coral') == 0:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment