268269270271272273274275276277278
try { connection = (JDBCRepositoryConnection) repository.connect(); connection.getConnection(); } finally { connection.disconnect(); } return repository; }
11981199120012011202120312041205120612071208
checkTypesRow(conn, "TYPE_INSTANCE_ID=0", 0, 5); // set row and dependent boolean type checkTypesSetRow(conn, null, 0, 1, true); checkTypesRow(conn, "TYPE_INSTANCE_ID=1", 1, 0); connection.disconnect(); repository.terminate(); } }); }
12341235123612371238123912401241124212431244
accessor.removePolicyDescriptor(connection, "oset"); // Check the database contents are empty checkAllEmpty(conn); connection.disconnect(); repository.terminate(); } }); }
12741275127612771278127912801281128212831284
checkTypesRow(conn, "TYPE_INSTANCE_ID=0", 0, 6); // set row and dependent boolean type checkTypesSetRow(conn, null, 0, 1, true); checkTypesRow(conn, "TYPE_INSTANCE_ID=1", 1, 0); connection.disconnect(); repository.terminate(); } }); }
13101311131213131314131513161317131813191320
accessor.removePolicyDescriptor(connection, "uset"); // Check the database contents are empty checkAllEmpty(conn); connection.disconnect(); repository.terminate(); } }); }
14451446144714481449145014511452145314541455
accessor.removePolicyDescriptor(connection, "structure1"); accessor.removePolicyDescriptor(connection, "structure2"); checkAllEmpty(conn); connection.disconnect(); repository.terminate(); } }); }
18661867186818691870187118721873187418751876
assertEquals("Number of tacs should match", tacCount, actual); // Check the database contents are empty checkAllEmpty(conn); connection.disconnect(); repository.terminate(); } }); }
200201202203204205206207208209210
throw new RepositoryException(closeConnectionMessage); } }; try { connection.disconnect(); fail("The closeConnection() method is not called by " + "disconnect()."); } catch (RepositoryException e) { if (!closeConnectionMessage.equals(e.getMessage())) { throw e;
892893894895896897898899900901902
// Check the database contents checkPolicyTypeRow(conn, null, "boolean", 0, 0); checkTypesRow(conn, null, 0, 0); checkCategoryRow(conn, null, 0, "category"); connection.disconnect(); repository.terminate(); } }); }
925926927928929930931932933934935
accessor.removePolicyDescriptor(connection, "boolean"); // Check the database contents are empty checkAllEmpty(conn); connection.disconnect(); repository.terminate(); } }); }