[Test] Report difference in test data file in a first place
This commit is contained in:
committed by
TeamCityServer
parent
0af1c81d62
commit
009add2b41
@@ -58,7 +58,7 @@ class TestRunner(private val testConfiguration: TestConfiguration) {
|
||||
withAssertionCatching { handler.processAfterAllModules(failedAssertions.isNotEmpty()) }
|
||||
}
|
||||
if (testConfiguration.metaInfoHandlerEnabled) {
|
||||
withAssertionCatching {
|
||||
withAssertionCatching(insertExceptionInStart = true) {
|
||||
globalMetadataInfoHandler.compareAllMetaDataInfos()
|
||||
}
|
||||
}
|
||||
@@ -124,11 +124,15 @@ class TestRunner(private val testConfiguration: TestConfiguration) {
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun withAssertionCatching(block: () -> Unit) {
|
||||
private inline fun withAssertionCatching(insertExceptionInStart: Boolean = false, block: () -> Unit) {
|
||||
try {
|
||||
block()
|
||||
} catch (e: AssertionError) {
|
||||
failedAssertions += e
|
||||
if (insertExceptionInStart) {
|
||||
failedAssertions.add(0, e)
|
||||
} else {
|
||||
failedAssertions += e
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user