diff --git a/lib/taskana-core/src/main/java/pro/taskana/configuration/DbSchemaCreator.java b/lib/taskana-core/src/main/java/pro/taskana/configuration/DbSchemaCreator.java index a5d2cde1d..588999930 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/configuration/DbSchemaCreator.java +++ b/lib/taskana-core/src/main/java/pro/taskana/configuration/DbSchemaCreator.java @@ -168,8 +168,7 @@ public class DbSchemaCreator { } } } catch (IOException e) { - e.printStackTrace(); - LOGGER.error("SchemaName sql parsing failed for schemaName {}", schemaName); + LOGGER.error("SchemaName sql parsing failed for schemaName {}", schemaName, e); } return new StringReader(content.toString()); } diff --git a/lib/taskana-core/src/test/java/pro/taskana/ArchitectureTest.java b/lib/taskana-core/src/test/java/pro/taskana/ArchitectureTest.java index c3ebb464a..325a04621 100644 --- a/lib/taskana-core/src/test/java/pro/taskana/ArchitectureTest.java +++ b/lib/taskana-core/src/test/java/pro/taskana/ArchitectureTest.java @@ -45,13 +45,11 @@ class ArchitectureTest { } @Test - @Disabled void noClassShouldThrowGenericException() { NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS.check(importedClasses); } @Test - @Disabled void noClassShouldAccessStandardStreams() { NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS.check(importedClasses); } diff --git a/lib/taskana-core/src/test/java/pro/taskana/security/JAASExtension.java b/lib/taskana-core/src/test/java/pro/taskana/security/JAASExtension.java index 9734ca89e..5c9f04e98 100644 --- a/lib/taskana-core/src/test/java/pro/taskana/security/JAASExtension.java +++ b/lib/taskana-core/src/test/java/pro/taskana/security/JAASExtension.java @@ -11,6 +11,7 @@ import javax.security.auth.Subject; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.InvocationInterceptor; import org.junit.jupiter.api.extension.ReflectiveInvocationContext; +import org.junit.platform.commons.JUnitException; /** * Runner for integration tests that enables JAAS subject. @@ -45,7 +46,7 @@ public class JAASExtension implements InvocationInterceptor { } catch (Exception | Error e) { throw e; } catch (Throwable e) { - throw new Exception(e); + throw new JUnitException("Execution of test failed: " + invocationContext.getExecutable().getName(), e); } return null; }); diff --git a/lib/taskana-data/src/main/java/pro/taskana/sampledata/SampleDataGenerator.java b/lib/taskana-data/src/main/java/pro/taskana/sampledata/SampleDataGenerator.java index cd52578f8..d77b3db38 100644 --- a/lib/taskana-data/src/main/java/pro/taskana/sampledata/SampleDataGenerator.java +++ b/lib/taskana-data/src/main/java/pro/taskana/sampledata/SampleDataGenerator.java @@ -16,6 +16,7 @@ import java.util.stream.Stream; import javax.sql.DataSource; +import org.apache.ibatis.jdbc.RuntimeSqlException; import org.apache.ibatis.jdbc.ScriptRunner; import org.apache.ibatis.jdbc.SqlRunner; import org.slf4j.Logger; @@ -99,7 +100,7 @@ public class SampleDataGenerator { return scripts.map(script -> SQLReplacer.getScriptAsSql(dbProductName, now, script)) .collect(Collectors.toList()); } catch (SQLException e) { - throw new RuntimeException("Connection to database failed.", e); + throw new RuntimeSqlException("Connection to database failed.", e); } } @@ -137,7 +138,7 @@ public class SampleDataGenerator { } } } catch (SQLException e) { - throw new RuntimeException("Failed to execute script.", e); + throw new RuntimeSqlException("Failed to execute script.", e); } }