TSK-988: Fix disabled architecture tests
This commit is contained in:
parent
d41407a459
commit
a02a4e41f7
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue