}
assertFalse("getURL is supported!", JDBC.vmSupportsJSR169());
assertTrue("getURL is supported!", JDBC.vmSupportsJDBC3());
TestConfiguration config = getTestConfiguration();
String expectedURL = config.getJDBCUrl();
// DERBY-4886: Embedded returns the URL without connection attributes,
// client returns the URL with connection attributes.
if (usingDerbyNetClient()) {
String[] urlComponents = url.split(";");
// Only compare whatever comes before the first semi-colon with
// the expected URL. Check connection attributes separately.
url = urlComponents[0];
// Put each actual connection attribute in a HashSet for easy
// comparison.
HashSet attrs = new HashSet();
for (int i = 1; i < urlComponents.length; i++) {
attrs.add(urlComponents[i]);
}
// Put each expected connection attribute in a HashSet.
HashSet expectedAttrs = new HashSet();
Properties ca = config.getConnectionAttributes();
Enumeration e = ca.propertyNames();
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
expectedAttrs.add(key + '=' + ca.getProperty(key));
}