Fixed a potential cause of ORA-12519: TNS:no appropriate service handler found

parent 2e4588be
...@@ -11,20 +11,25 @@ use function array_map; ...@@ -11,20 +11,25 @@ use function array_map;
class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
{ {
/** @var bool */
private static $privilegesGranted = false;
protected function setUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
if (! isset($GLOBALS['db_username'])) { if (self::$privilegesGranted) {
$this->markTestSkipped('Foo'); return;
} }
$username = $GLOBALS['db_username']; if (! isset($GLOBALS['db_username'])) {
self::markTestSkipped('Username must be explicitly specified in connection parameters for this test');
}
$query = 'GRANT ALL PRIVILEGES TO ' . $username; TestUtil::getTempConnection()
->exec('GRANT ALL PRIVILEGES TO ' . $GLOBALS['db_username']);
$conn = TestUtil::getTempConnection(); self::$privilegesGranted = true;
$conn->executeUpdate($query);
} }
public function testRenameTable() public function testRenameTable()
......
Markdown is supported
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