use of org.apache.ignite.configuration.OdbcConfiguration in project ignite by apache.
the class JdbcThinAbstractSelfTest method getConfiguration.
/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setOdbcConfiguration(new OdbcConfiguration());
return cfg;
}
use of org.apache.ignite.configuration.OdbcConfiguration in project ignite by apache.
the class OdbcConfigurationValidationSelfTest method testConnectionParams.
/**
* Test connection parameters: sendBufferSize, receiveBufferSize, connectionTimeout.
*
* @throws Exception If failed.
*/
@Test
public void testConnectionParams() throws Exception {
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketSendBufferSize(4 * 1024), true);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketReceiveBufferSize(4 * 1024), true);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketSendBufferSize(-64 * 1024), false);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketReceiveBufferSize(-64 * 1024), false);
}
use of org.apache.ignite.configuration.OdbcConfiguration in project ignite by apache.
the class ClientConnectorConfigurationValidationSelfTest method testIgnoreOdbcAndSqlWhenClientSet.
/**
* Test SQL connector conversion.
*
* @throws Exception If failed.
*/
@Test
public void testIgnoreOdbcAndSqlWhenClientSet() throws Exception {
int cliPort = ClientConnectorConfiguration.DFLT_PORT - 1;
int sqlPort = ClientConnectorConfiguration.DFLT_PORT - 2;
int odbcPort = ClientConnectorConfiguration.DFLT_PORT - 3;
IgniteConfiguration cfg = baseConfiguration();
cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setPort(cliPort));
cfg.setSqlConnectorConfiguration(new SqlConnectorConfiguration().setPort(sqlPort));
cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + odbcPort));
Ignition.start(cfg);
checkJdbc(null, cliPort);
}
use of org.apache.ignite.configuration.OdbcConfiguration in project ignite by apache.
the class ClientConnectorConfigurationValidationSelfTest method testIgnoreOdbcWhenSqlSet.
/**
* Test SQL connector conversion.
*
* @throws Exception If failed.
*/
@Test
public void testIgnoreOdbcWhenSqlSet() throws Exception {
int port = ClientConnectorConfiguration.DFLT_PORT - 1;
IgniteConfiguration cfg = baseConfiguration();
cfg.setSqlConnectorConfiguration(new SqlConnectorConfiguration().setPort(port));
cfg.setOdbcConfiguration(new OdbcConfiguration().setEndpointAddress("127.0.0.1:" + (port - 1)));
Ignition.start(cfg);
checkJdbc(null, port);
}
use of org.apache.ignite.configuration.OdbcConfiguration in project ignite by apache.
the class SqlListenerProcessorValidationSelfTest method testConnectionParams.
/**
* Test connection parameters: sendBufferSize, receiveBufferSize, connectionTimeout.
*
* @throws Exception If failed.
*/
public void testConnectionParams() throws Exception {
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketSendBufferSize(4 * 1024), true);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketReceiveBufferSize(4 * 1024), true);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketSendBufferSize(-64 * 1024), false);
check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9998..10000").setSocketReceiveBufferSize(-64 * 1024), false);
}
Aggregations