use of org.firebirdsql.management.FBManager in project jaybird by FirebirdSQL.
the class TestSpecialEmbeddedServerUrls method setUp.
@Before
public void setUp() throws Exception {
Class.forName(FBDriver.class.getName());
gdsType = GDSType.getType(EmbeddedGDSFactoryPlugin.EMBEDDED_TYPE_NAME);
fbManager = new FBManager(gdsType);
fbManager.setServer("localhost");
fbManager.setPort(5066);
fbManager.start();
File dbFolder = temporaryFolder.newFolder("db");
mRelativeDatabasePath = "testES01874.fdb";
mAbsoluteDatabasePath = new File(dbFolder, mRelativeDatabasePath).getAbsolutePath();
fbManager.createDatabase(mAbsoluteDatabasePath, "SYSDBA", "masterkey");
}
use of org.firebirdsql.management.FBManager in project jaybird by FirebirdSQL.
the class TestSpecialEmbeddedServerUrls method testDriverManagerGetConnectionWithoutServerAndPortInUrlWithRelativeDatabasePath.
@Test
public void testDriverManagerGetConnectionWithoutServerAndPortInUrlWithRelativeDatabasePath() throws Exception {
FBManager testFBManager = new FBManager(gdsType);
testFBManager.setDropOnStop(true);
try {
testFBManager.start();
testFBManager.createDatabase(mRelativeDatabasePath, "SYSDBA", "masterkey");
try (Connection connection = DriverManager.getConnection("jdbc:firebirdsql:embedded:" + mRelativeDatabasePath + "?encoding=NONE", "SYSDBA", "masterkey")) {
assertTrue(connection.isValid(1000));
}
} finally {
testFBManager.stop();
}
}
use of org.firebirdsql.management.FBManager in project jaybird by FirebirdSQL.
the class TestSpecialEmbeddedServerUrls method testFBManagerWithoutSettingServerAndPort.
@Test
public void testFBManagerWithoutSettingServerAndPort() throws Exception {
FBManager testFBManager = new FBManager(gdsType);
testFBManager.start();
testFBManager.dropDatabase(mAbsoluteDatabasePath, "SYSDBA", "masterkey");
testFBManager.createDatabase(mAbsoluteDatabasePath, "SYSDBA", "masterkey");
testFBManager.stop();
}
use of org.firebirdsql.management.FBManager in project jaybird by FirebirdSQL.
the class TestServicesAPI method setUp.
@Before
public void setUp() throws Exception {
Class.forName(FBDriver.class.getName());
gdsType = GDSType.getType(EmbeddedGDSFactoryPlugin.EMBEDDED_TYPE_NAME);
dbFactory = GDSFactory.getDatabaseFactoryForType(gdsType);
fbManager = new FBManager(gdsType);
fbManager.setServer("localhost");
fbManager.setPort(5066);
fbManager.start();
File dbFolder = temporaryFolder.newFolder("db");
logFolder = temporaryFolder.newFolder("log");
mAbsoluteBackupPath = new File(dbFolder, "testES01344.fbk").getAbsolutePath();
mAbsoluteDatabasePath = new File(dbFolder, "testES01344.fdb").getAbsolutePath();
fbManager.createDatabase(mAbsoluteDatabasePath, "SYSDBA", "masterkey");
}
use of org.firebirdsql.management.FBManager in project jaybird by FirebirdSQL.
the class TestServicesAPI method dropDatabase.
private void dropDatabase() throws Exception {
final FBManager testFBManager = new FBManager(gdsType);
testFBManager.start();
testFBManager.dropDatabase(mAbsoluteDatabasePath, "SYSDBA", "masterkey");
testFBManager.stop();
}
Aggregations