import java.lang.reflect.Method;
import java.sql.Connection;
+import java.util.logging.Level;
+import java.util.logging.Logger;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.Ignore;
-import org.wamblee.cache.EhCache;
-import org.wamblee.io.ClassPathResource;
-import org.wamblee.security.authentication.GroupSet;
-import org.wamblee.security.authentication.NameValidator;
-import org.wamblee.security.authentication.RegexpNameValidator;
-import org.wamblee.security.authentication.User;
import org.wamblee.security.authentication.UserAdministration;
-import org.wamblee.security.authentication.UserAdministrationImpl;
import org.wamblee.security.authentication.UserAdministrationImplTest;
-import org.wamblee.security.authentication.UserSet;
-import org.wamblee.security.authentication.jpa.JpaGroupSet;
-import org.wamblee.security.authentication.jpa.JpaUserSet;
-import org.wamblee.security.encryption.Md5HexMessageDigester;
-import org.wamblee.security.encryption.MessageDigester;
-import org.wamblee.support.persistence.JpaTester;
-import org.wamblee.support.persistence.TransactionProxyFactory;
-import org.wamblee.support.persistence.DatabaseUtils.JdbcUnitOfWork;
+import org.wamblee.test.persistence.DatabaseUtils.JdbcUnitOfWork;
/**
* User administration tests with persistence based on Hibernate. This executes
* @author Erik Brakkee
*/
public class JpaUserAdministrationTest extends UserAdministrationImplTest {
- private static final Log LOG = LogFactory
- .getLog(JpaUserAdministrationTest.class);
+ private static final Logger LOG = Logger
+ .getLogger(JpaUserAdministrationTest.class.getName());
private UserAdministrationTester userAdminTester;
for (final Method method : methods) {
if (method.getName().startsWith("test")) {
- userAdminTester.getJpaTester().getDbUtils().cleanDatabase();
+ userAdminTester.getJpaTester().getDbUtils().cleanDatabase(new SecurityTables());
clearUserCache();
userAdminTester.getJpaTester().getDbUtils().executeInTransaction(
new JdbcUnitOfWork<Void>() {
try {
method.invoke(JpaUserAdministrationTest.this);
} catch (Throwable t) {
- LOG.error("Test " + method.getName() +
- " failed");
+ LOG.log(Level.WARNING, "Test " + method.getName() +
+ " failed", t);
throw new RuntimeException(t.getMessage(), t);
} finally {
LOG.info("Test " + method.getName() +