Author: dgeraskov
Date: 2011-11-01 06:51:47 -0400 (Tue, 01 Nov 2011)
New Revision: 36109
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsCore.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10073
As the same result list is used we need to remember previous failures/errors counts
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java 2011-11-01
10:22:03 UTC (rev 36108)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java 2011-11-01
10:51:47 UTC (rev 36109)
@@ -73,11 +73,13 @@
assertTrue(useSelRes);
testProject.restartTestFolders();
executions = 0;
+ int prev_failCount = result.failureCount();
+ int prev_errCount = result.errorCount();
allTestsRunForProject();
if (Customization.USE_CONSOLE_OUTPUT) {
System.out.println("=====================================================");
//$NON-NLS-1$
- System.out.print(result.errorCount() +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
- System.out.print(result.failureCount() +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
+ System.out.print(result.errorCount() - prev_errCount +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
+ System.out.print(result.failureCount() - prev_failCount +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
System.out.print((System.currentTimeMillis() - start_time) / 1000 +
ConsoleTestMessages.HibernateAllMappingTests_seconds + "\t" ); //$NON-NLS-1$
System.out.println(executions +
ConsoleTestMessages.HibernateAllMappingTests_packages_tested );
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsCore.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsCore.java 2011-11-01
10:22:03 UTC (rev 36108)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsCore.java 2011-11-01
10:51:47 UTC (rev 36109)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -51,13 +51,15 @@
// 2) +++
testProject.restartTestFolders();
executions = 0;
+ int prev_failCount = result.failureCount();
+ int prev_errCount = result.errorCount();
while (testProject.setupNextTestFolder()) {
allTestsRunForProject();
}
if (Customization.USE_CONSOLE_OUTPUT) {
System.out.println("=====================================================");
//$NON-NLS-1$
- System.out.print(result.errorCount() +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
- System.out.print(result.failureCount() +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
+ System.out.print(result.errorCount() - prev_errCount +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
+ System.out.print(result.failureCount() - prev_failCount +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
System.out.print((System.currentTimeMillis() - start_time) / 1000 +
ConsoleTestMessages.HibernateAllMappingTests_seconds + "\t" ); //$NON-NLS-1$
System.out.println(executions +
ConsoleTestMessages.HibernateAllMappingTests_packages_tested );
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java 2011-11-01
10:22:03 UTC (rev 36108)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java 2011-11-01
10:51:47 UTC (rev 36109)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -67,11 +67,13 @@
assertTrue(useSelRes);
testProject.restartTestFolders();
executions = 0;
+ int prev_failCount = result.failureCount();
+ int prev_errCount = result.errorCount();
allTestsRunForProject();
if (Customization.USE_CONSOLE_OUTPUT) {
System.out.println("=====================================================");
//$NON-NLS-1$
- System.out.print(result.errorCount() +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
- System.out.print(result.failureCount() +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
+ System.out.print(result.errorCount() - prev_failCount +
ConsoleTestMessages.HibernateAllMappingTests_errors + " \t"); //$NON-NLS-1$
+ System.out.print(result.failureCount() - prev_errCount +
ConsoleTestMessages.HibernateAllMappingTests_fails + "\t"); //$NON-NLS-1$
System.out.print((System.currentTimeMillis() - start_time) / 1000 +
ConsoleTestMessages.HibernateAllMappingTests_seconds + "\t" ); //$NON-NLS-1$
System.out.println(executions +
ConsoleTestMessages.HibernateAllMappingTests_packages_tested );
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2011-11-01
10:22:03 UTC (rev 36108)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2011-11-01
10:51:47 UTC (rev 36109)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2007-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -76,6 +76,8 @@
if (!highlighted) {
String out =
NLS.bind(ConsoleTestMessages.OpenMappingFileTest_highlighted_region_for_property_is_empty_package,
new Object[]{compositeProperty.getNodeName(), testPackage.getElementName()});
+ if (Customization.USE_CONSOLE_OUTPUT)
+ System.err.println(out);
fail(out);
}
Object[] compProperties = propertyWorkbenchAdapter.getChildren(compositeProperty);
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2011-11-01
10:22:03 UTC (rev 36108)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2011-11-01
10:51:47 UTC (rev 36109)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2007-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -85,6 +85,8 @@
boolean highlighted = Utils.hasSelection(editor);
if (!highlighted) {
String out =
NLS.bind(ConsoleTestMessages.OpenSourceFileTest_highlighted_region_for_is_empty,
selection);
+ if (Customization.USE_CONSOLE_OUTPUT)
+ System.err.println(out);
fail(out);
}
} catch (PartInitException e) {