|
static Properties | PROPERTIES = new Property_loader("connection_test.properties") |
|
static final String | user = PROPERTIES.getProperty("default_super_user") |
|
static final String | password = PROPERTIES.getProperty("default_user_password") |
|
static Properties | base_properties |
|
Definition at line 15 of file HeavyAIConnectionTest.java.
static void ai.heavy.jdbc.HeavyAIConnectionTest.setUpBeforeClass |
( |
| ) |
throws Exception |
|
inlinestatic |
Definition at line 22 of file HeavyAIConnectionTest.java.
References ai.heavy.jdbc.HeavyAIConnectionTest.base_properties.
23 String fileName = System.getProperty(
"propertiesFileName");
25 if (fileName == null || fileName.equals(
"")) {
28 File initialFile =
new File(fileName);
29 InputStream inputStream =
new FileInputStream(initialFile);
30 base_properties.load(inputStream);
static Properties base_properties
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url1 |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url2 |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url3 |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url4 |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url5 |
( |
| ) |
|
|
inline |
Definition at line 110 of file HeavyAIConnectionTest.java.
References report.conn.
113 url = PROPERTIES.getProperty(
"query_connection_url5");
114 Connection
conn = DriverManager.getConnection(url);
115 assertNotEquals(null, conn);
117 boolean closed = conn.isClosed();
118 assertEquals(
true, closed);
120 }
catch (SQLException sq) {
121 String err =
"Connection test failed for url " + url +
":" + sq.toString();
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1_url_too_long |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1b_binary_encrypted_default |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1c_binary_encrypted_supplied_truststore_pkiauth_valid |
( |
| ) |
|
|
inline |
Definition at line 221 of file HeavyAIConnectionTest.java.
References report.conn, and ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES.
223 Properties pt =
new Properties();
224 String url = PROPERTIES.getProperty(
"binary_connection_url") +
":"
225 +
PROPERTIES.getProperty(
"default_db") +
":binary_tls";
227 ClassLoader cl = getClass().getClassLoader();
228 String trust_store = PROPERTIES.getProperty(
"server_trust_store");
229 trust_store = cl.getResource(trust_store).getPath();
230 pt.setProperty(
"server_trust_store", trust_store);
232 String sslcert_cl1 = PROPERTIES.getProperty(
"sslcert_cl1_pkcs12");
233 sslcert_cl1 = cl.getResource(sslcert_cl1).getPath();
234 pt.setProperty(
"sslcert", sslcert_cl1);
236 pt.setProperty(
"sslkey_password", PROPERTIES.getProperty(
"sslkey_password_cl1"));
238 pt.setProperty(
"user",
"pki");
239 pt.setProperty(
"password",
"");
240 pt.setProperty(
"server_trust_store_pwd",
241 PROPERTIES.getProperty(
"server_trust_store_password"));
242 pt.setProperty(
"pkiauth", PROPERTIES.getProperty(
"pkiauth"));
244 Connection
conn = DriverManager.getConnection(url, pt);
245 assertNotEquals(null,
conn);
247 Statement statement = conn.createStatement();
248 statement.executeUpdate(
"drop table if exists test_jdbc_tm_tble");
251 boolean closed = conn.isClosed();
252 assertEquals(
true, closed);
253 }
catch (SQLException sq) {
254 String err =
"Connection test failed " + sq.toString();
static Properties PROPERTIES
void ai.heavy.jdbc.HeavyAIConnectionTest.tst1e_binary_encrypted_supplied_truststore_pkiauth_invalid |
( |
| ) |
|
|
inline |
Definition at line 260 of file HeavyAIConnectionTest.java.
References report.conn, and ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES.
262 Properties pt =
new Properties();
263 String url = PROPERTIES.getProperty(
"binary_connection_url") +
":"
264 +
PROPERTIES.getProperty(
"default_db") +
":binary_tls";
266 ClassLoader cl = getClass().getClassLoader();
267 String trust_store = PROPERTIES.getProperty(
"server_trust_store");
268 trust_store = cl.getResource(trust_store).getPath();
269 pt.setProperty(
"server_trust_store", trust_store);
272 String sslcert_cl2 = PROPERTIES.getProperty(
"sslcert_cl2");
273 sslcert_cl2 = cl.getResource(sslcert_cl2).getPath();
274 pt.setProperty(
"sslcert", sslcert_cl2);
276 String sslkey_cl2 = PROPERTIES.getProperty(
"sslkey_cl2");
277 sslkey_cl2 = cl.getResource(sslkey_cl2).getPath();
278 pt.setProperty(
"sslkey", sslkey_cl2);
280 pt.setProperty(
"user",
"pki");
281 pt.setProperty(
"password",
"");
282 pt.setProperty(
"server_trust_store_pwd",
283 PROPERTIES.getProperty(
"server_trust_store_password"));
284 pt.setProperty(
"pkiauth", PROPERTIES.getProperty(
"pkiauth"));
286 Connection
conn = DriverManager.getConnection(url, pt);
287 assertNotEquals(null,
conn);
289 boolean closed = conn.isClosed();
290 fail(
"Credential should not have been accepted");
291 }
catch (SQLException sq) {
292 String err =
"Connection test failed " + sq.toString();
293 assertTrue(err.contains(
"Invalid credentials"));
static Properties PROPERTIES
void ai.heavy.jdbc.HeavyAIConnectionTest.tst2_http_unencrypted |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3_connect_fail |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3a_https_encrypted_without_server_validation_default_truststore |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3b_https_encrypted_without_server_validation_supplied_truststore |
( |
| ) |
|
|
inline |
Definition at line 318 of file HeavyAIConnectionTest.java.
References report.conn, ai.heavy.jdbc.HeavyAIConnectionTest.password, ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES, and ai.heavy.jdbc.HeavyAIConnectionTest.user.
320 ClassLoader cl = getClass().getClassLoader();
321 String trust_store = PROPERTIES.getProperty(
"server_trust_store");
322 trust_store = cl.getResource(trust_store).getPath();
324 Properties pt =
new Properties();
325 pt.setProperty(
"server_trust_store", trust_store);
326 pt.setProperty(
"server_trust_store_pwd",
327 PROPERTIES.getProperty(
"server_trust_store_password"));
329 pt.setProperty(
"user",
user);
330 pt.setProperty(
"password",
password);
331 pt.setProperty(
"protocol",
"https_insecure");
333 String url = PROPERTIES.getProperty(
"https_connection_url") +
":"
335 Connection
conn = DriverManager.getConnection(url, pt);
336 assertNotEquals(null, conn);
338 boolean closed = conn.isClosed();
339 assertEquals(
true, closed);
340 }
catch (SQLException sq) {
341 String err =
"Connection test failed " + sq.toString();
static Properties PROPERTIES
static final String password
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3c_https_encrypted_server_validation_default_truststore |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3d_https_encrypted_with_server_validation_supplied_truststore |
( |
| ) |
|
|
inline |
Definition at line 367 of file HeavyAIConnectionTest.java.
References report.conn, ai.heavy.jdbc.HeavyAIConnectionTest.password, ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES, and ai.heavy.jdbc.HeavyAIConnectionTest.user.
369 ClassLoader cl = getClass().getClassLoader();
370 String trust_store = PROPERTIES.getProperty(
"ca_primary_trust_store");
371 trust_store = cl.getResource(trust_store).getPath();
372 Properties pt =
new Properties();
373 pt.setProperty(
"server_trust_store", trust_store);
374 pt.setProperty(
"server_trust_store_pwd",
375 PROPERTIES.getProperty(
"server_trust_store_password"));
377 pt.setProperty(
"user",
user);
378 pt.setProperty(
"password",
password);
379 pt.setProperty(
"protocol",
"https");
381 String url = PROPERTIES.getProperty(
"https_connection_url") +
":"
384 Connection
conn = DriverManager.getConnection(url, pt);
386 assertNotEquals(null, conn);
387 boolean closed = conn.isClosed();
388 assertEquals(
true, closed);
390 assertNotEquals(null, conn);
391 }
catch (SQLException sq) {
392 String err =
"Connection test failed " + sq.toString();
static Properties PROPERTIES
static final String password
void ai.heavy.jdbc.HeavyAIConnectionTest.tst3e_https_insecure_encrypted_supplied_truststore_pkiauth_valid |
( |
| ) |
|
|
inline |
Definition at line 397 of file HeavyAIConnectionTest.java.
References report.conn, and ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES.
399 Properties pt =
new Properties();
400 String url = PROPERTIES.getProperty(
"https_connection_url") +
":"
401 +
PROPERTIES.getProperty(
"default_db") +
":https_insecure";
403 ClassLoader cl = getClass().getClassLoader();
404 String trust_store = PROPERTIES.getProperty(
"server_trust_store");
405 trust_store = cl.getResource(trust_store).getPath();
406 pt.setProperty(
"server_trust_store", trust_store);
408 String sslcert_cl1 = PROPERTIES.getProperty(
"sslcert_cl1_pkcs12");
409 sslcert_cl1 = cl.getResource(sslcert_cl1).getPath();
410 pt.setProperty(
"sslcert", sslcert_cl1);
412 pt.setProperty(
"sslkey_password", PROPERTIES.getProperty(
"sslkey_password_cl1"));
414 pt.setProperty(
"user",
"pki");
415 pt.setProperty(
"password",
"");
416 pt.setProperty(
"server_trust_store_pwd",
417 PROPERTIES.getProperty(
"server_trust_store_password"));
418 pt.setProperty(
"pkiauth", PROPERTIES.getProperty(
"pkiauth"));
420 Connection
conn = DriverManager.getConnection(url, pt);
421 Statement statement = conn.createStatement();
422 statement.executeUpdate(
"drop table if exists test_jdbc_tm_tble");
423 assertNotEquals(null,
conn);
425 boolean closed = conn.isClosed();
426 assertEquals(
true, closed);
427 }
catch (SQLException sq) {
428 String err =
"Connection test failed " + sq.toString();
static Properties PROPERTIES
void ai.heavy.jdbc.HeavyAIConnectionTest.tst4_connect_url_override |
( |
| ) |
|
|
inline |
void ai.heavy.jdbc.HeavyAIConnectionTest.tst5_properties_connection |
( |
| ) |
|
|
inline |
Properties ai.heavy.jdbc.HeavyAIConnectionTest.base_properties |
|
staticpackage |
final String ai.heavy.jdbc.HeavyAIConnectionTest.password = PROPERTIES.getProperty("default_user_password") |
|
staticpackage |
Definition at line 18 of file HeavyAIConnectionTest.java.
Referenced by ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url1(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url2(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url3(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url4(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_url_too_long(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1b_binary_encrypted_default(), ai.heavy.jdbc.HeavyAIConnectionTest.tst2_http_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3_connect_fail(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3a_https_encrypted_without_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3b_https_encrypted_without_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3c_https_encrypted_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3d_https_encrypted_with_server_validation_supplied_truststore(), and ai.heavy.jdbc.HeavyAIConnectionTest.tst4_connect_url_override().
Properties ai.heavy.jdbc.HeavyAIConnectionTest.PROPERTIES = new Property_loader("connection_test.properties") |
|
staticpackage |
Definition at line 16 of file HeavyAIConnectionTest.java.
Referenced by ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1b_binary_encrypted_default(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1c_binary_encrypted_supplied_truststore_pkiauth_valid(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1e_binary_encrypted_supplied_truststore_pkiauth_invalid(), ai.heavy.jdbc.HeavyAIConnectionTest.tst2_http_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3_connect_fail(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3a_https_encrypted_without_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3b_https_encrypted_without_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3c_https_encrypted_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3d_https_encrypted_with_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3e_https_insecure_encrypted_supplied_truststore_pkiauth_valid(), and ai.heavy.jdbc.HeavyAIConnectionTest.tst4_connect_url_override().
final String ai.heavy.jdbc.HeavyAIConnectionTest.user = PROPERTIES.getProperty("default_super_user") |
|
staticpackage |
Definition at line 17 of file HeavyAIConnectionTest.java.
Referenced by heavydb.thrift.ttypes.TSessionInfo.read(), heavydb.thrift.Heavy.connect_args.read(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url1(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url2(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url3(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url4(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_url_too_long(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1b_binary_encrypted_default(), ai.heavy.jdbc.HeavyAIConnectionTest.tst2_http_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3_connect_fail(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3a_https_encrypted_without_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3b_https_encrypted_without_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3c_https_encrypted_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3d_https_encrypted_with_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst4_connect_url_override(), heavydb.thrift.ttypes.TSessionInfo.write(), and heavydb.thrift.Heavy.connect_args.write().
The documentation for this class was generated from the following file: