Commit 9a82511f authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Dump CORAL output when creating/opening database in PyCoolReferenceDb


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@20084 4525493e-7705-40b1-a816-d608a930855b
parent 23e3f490
......@@ -18,6 +18,10 @@ import CoolDescribeTable
###print 'DEBUG: Import CoolQueryManager'
import CoolQueryManager
###print 'DEBUG: Import coral'
###global coral
from PyCool import coral
##############################################################################
class ReferenceDbMgr:
......@@ -168,9 +172,6 @@ class ReferenceDbMgr:
'using older software release', self.svcVersion
sys.exit(-1)
global coral
#print 'DEBUG: Import coral'
from PyCool import coral
if ( self.svcVersion22x ):
connSvc = self.app.connectionSvc()
connSvcConf = connSvc.configuration()
......@@ -250,9 +251,15 @@ class ReferenceDbMgr:
( connectString, True ) # R/W
dbReplica = CoolAuthentication.coralReplica( dbProp )
print 'DEBUG: -> db replica (R/W):', dbReplica
print 'DEBUG: -----------------------------------------------------'
coralVrb = coral.MessageStream.msgVerbosity()
coral.MessageStream.setMsgVerbosity( 3 )
db = self.dbSvc.createDatabase( connectString )
coral.MessageStream.setMsgVerbosity( coralVrb )
print 'DEBUG: -----------------------------------------------------'
#print 'DEBUG: Database created'
print 'DEBUG: Database created'
#print 'DEBUG: -> db ID:', db.databaseId()
###print 'DEBUG: -> db attributes:', db.databaseAttributes()
......@@ -935,8 +942,13 @@ class TestReferenceDb1RO( unittest.TestCase ):
dbReplica = CoolAuthentication.coralReplica( dbProp )
print 'DEBUG: -> db replica (R/O):', dbReplica
readOnly = True
print 'DEBUG: -----------------------------------------------------'
coralVrb = coral.MessageStream.msgVerbosity()
coral.MessageStream.setMsgVerbosity( 3 )
TestReferenceDb1RO.db = TestReferenceDb1RO.mgr.dbSvc.openDatabase\
( connectString, readOnly )
coral.MessageStream.setMsgVerbosity( coralVrb )
print 'DEBUG: -----------------------------------------------------'
print 'DEBUG: Database opened'
#print 'DEBUG: -> db ID:', TestReferenceDb1RO.db.databaseId()
dbAttributes = TestReferenceDb1RO.db.databaseAttributes()
......@@ -2548,8 +2560,13 @@ class TestReferenceDb1RW( unittest.TestCase ):
dbReplica = CoolAuthentication.coralReplica( dbProp )
print 'DEBUG: -> db replica (R/W):', dbReplica
readOnly = False
print 'DEBUG: -----------------------------------------------------'
coralVrb = coral.MessageStream.msgVerbosity()
coral.MessageStream.setMsgVerbosity( 3 )
TestReferenceDb1RW.db = TestReferenceDb1RW.mgr.dbSvc.openDatabase\
( connectString, readOnly )
coral.MessageStream.setMsgVerbosity( coralVrb )
print 'DEBUG: -----------------------------------------------------'
print 'DEBUG: Database opened'
#print 'DEBUG: -> db ID:', TestReferenceDb1RW.db.databaseId()
dbAttributes = TestReferenceDb1RW.db.databaseAttributes()
......@@ -3272,8 +3289,13 @@ class TestReferenceDb2RO( unittest.TestCase ):
dbReplica = CoolAuthentication.coralReplica( dbProp )
print 'DEBUG: -> db replica (R/O):', dbReplica
readOnly = True
print 'DEBUG: -----------------------------------------------------'
coralVrb = coral.MessageStream.msgVerbosity()
coral.MessageStream.setMsgVerbosity( 3 )
TestReferenceDb2RO.db = TestReferenceDb2RO.mgr.dbSvc.openDatabase\
( connectString, readOnly )
coral.MessageStream.setMsgVerbosity( coralVrb )
print 'DEBUG: -----------------------------------------------------'
print 'DEBUG: Database opened'
#print 'DEBUG: -> db ID:', TestReferenceDb2RO.db.databaseId()
dbAttributes = TestReferenceDb2RO.db.databaseAttributes()
......
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