1

I have tried as suggested here.

I am able to access the connection object, but it says

IllegalStateException - state should be: open

Below is the snippet which I have tried.

//set connection
testSuite.metaClass.db = db 

//get connection (i am trying to access it from the same testSuite for testing purpose)
def connection = testSuite.db.getConnection()
for(def userObj :connection.User.find()){
 log.info userObj
}
johnnyRose
  • 7,310
  • 17
  • 40
  • 61
Ren Phil
  • 11
  • 2

0 Answers0