Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2020-06-08 13:45:47 +0000
committerEike Stepper2020-06-08 13:45:47 +0000
commit92cb2691e680feefd8b49a9b57d9ef2b87b0384d (patch)
tree8590a19aa178e68e2f49160158b5ca0e87eebb1c
parent62746add6b2375497604093bce43237900f6bc43 (diff)
downloadcdo-92cb2691e680feefd8b49a9b57d9ef2b87b0384d.tar.gz
cdo-92cb2691e680feefd8b49a9b57d9ef2b87b0384d.tar.xz
cdo-92cb2691e680feefd8b49a9b57d9ef2b87b0384d.zip
[Releng] Make sure that exceptions in tearDown() are logged with the test case name
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java6
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
index f67ff688be..8f1d6d34be 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/ConfigTest.java
@@ -837,7 +837,7 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
}
catch (Exception ex)
{
- IOUtil.print(ex);
+ log(ex);
}
try
@@ -846,7 +846,7 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
}
catch (Exception ex)
{
- IOUtil.print(ex);
+ log(ex);
}
}
@@ -881,4 +881,10 @@ public abstract class ConfigTest extends AbstractOMTest implements IConstants
{
String[] value();
}
+
+ void log(Exception ex)
+ {
+ IOUtil.ERR().println("Error in " + getTestMethodName());
+ IOUtil.print(ex);
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
index 5cdb27caf9..97eaabf49d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/Scenario.java
@@ -233,7 +233,7 @@ public class Scenario implements IScenario
}
catch (Exception ex)
{
- IOUtil.print(ex);
+ currentTest.log(ex);
}
try
@@ -242,7 +242,7 @@ public class Scenario implements IScenario
}
catch (Exception ex)
{
- IOUtil.print(ex);
+ currentTest.log(ex);
}
try
@@ -251,7 +251,7 @@ public class Scenario implements IScenario
}
catch (Exception ex)
{
- IOUtil.print(ex);
+ currentTest.log(ex);
}
}

Back to the top