use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.
the class TestFirebirdVersionMetaData method shouldReturn3_0ForFirebird4_0.
@Test
public void shouldReturn3_0ForFirebird4_0() throws Exception {
GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V4.0.0.459 Firebird 4.0");
assertEquals(FirebirdVersionMetaData.FIREBIRD_3_0, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.
the class FBSimpleDataSourceTest method enableWireCompression.
@Test
public void enableWireCompression() throws Exception {
assumeThat("Test only works with pure java connections", FBTestProperties.GDS_TYPE, isPureJavaType());
assumeTrue("Test requires wire compression", getDefaultSupportInfo().supportsWireCompression());
FBSimpleDataSource ds = new FBSimpleDataSource();
ds.setDatabaseName(FBTestProperties.DB_DATASOURCE_URL);
ds.setUser(FBTestProperties.DB_USER);
ds.setPassword(FBTestProperties.DB_PASSWORD);
ds.setType(FBTestProperties.getGdsType().toString());
ds.setWireCompression(true);
try (Connection connection = ds.getConnection()) {
assertTrue(connection.isValid(0));
GDSServerVersion serverVersion = connection.unwrap(FirebirdConnection.class).getFbDatabase().getServerVersion();
assertTrue("expected wire compression in use", serverVersion.isWireCompressionUsed());
}
}
use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.
the class TestFBConnectionPoolDataSource method enableWireCompression.
@Test
public void enableWireCompression() throws Exception {
assumeThat("Test only works with pure java connections", FBTestProperties.GDS_TYPE, isPureJavaType());
assumeTrue("Test requires wire compression", getDefaultSupportInfo().supportsWireCompression());
ds.setWireCompression(true);
PooledConnection pooledConnection = ds.getPooledConnection();
try (Connection connection = pooledConnection.getConnection()) {
assertTrue(connection.isValid(0));
GDSServerVersion serverVersion = connection.unwrap(FirebirdConnection.class).getFbDatabase().getServerVersion();
assertTrue("expected wire compression in use", serverVersion.isWireCompressionUsed());
} finally {
pooledConnection.close();
}
}
use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.
the class TestFBXADataSource method enableWireCompression.
@Test
public void enableWireCompression() throws Exception {
assumeThat("Test only works with pure java connections", FBTestProperties.GDS_TYPE, isPureJavaType());
assumeTrue("Test requires wire compression", getDefaultSupportInfo().supportsWireCompression());
ds.setWireCompression(true);
XAConnection xaConnection = ds.getXAConnection();
try (Connection connection = xaConnection.getConnection()) {
assertTrue(connection.isValid(0));
GDSServerVersion serverVersion = connection.unwrap(FirebirdConnection.class).getFbDatabase().getServerVersion();
assertTrue("expected wire compression in use", serverVersion.isWireCompressionUsed());
} finally {
xaConnection.close();
}
}
use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.
the class TestFirebirdVersionMetaData method shouldReturn3_0ForFirebird3_0.
@Test
public void shouldReturn3_0ForFirebird3_0() throws Exception {
GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V3.0.1.32609 Firebird 3.0");
assertEquals(FirebirdVersionMetaData.FIREBIRD_3_0, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
Aggregations