/** * Decorate a set of tests to use an encrypted single use database. This is to run tests using * encryption as a general test and not specific tests of how encryption is handled. E.g. tests of * setting various URL attributes would be handled in a specific test. <br> * The database will use the default encryption algorithm. * * @param test test to decorate * @param bootPassword boot passphrase to use * @return decorated tests */ public static Test encryptedDatabaseBpw(Test test, String bootPassword) { if (JDBC.vmSupportsJSR169()) return new TestSuite("no encryption support"); Properties attributes = new Properties(); attributes.setProperty("dataEncryption", "true"); attributes.setProperty("bootPassword", bootPassword); return attributesDatabase(attributes, test); }
/** Returns true if the derby client is available to the tests. */ public static boolean hasClient() { // classes folder - assume all is available. if (!SecurityManagerSetup.isJars) return true; // if we attempt to check on availability of the ClientDataSource with // JSR169, attempts will be made to load classes not supported in // that environment, such as javax.naming.Referenceable. See DERBY-2269. if (!JDBC.vmSupportsJSR169()) { return hasCorrectJar("/derbyclient.jar", "org.apache.derby.jdbc.ClientDataSource"); } else return false; }