Author: dgolovin
Date: 2008-10-23 19:27:05 -0400 (Thu, 23 Oct 2008)
New Revision: 11132
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
Log:
fix tests hanging
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
===================================================================
---
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2008-10-23
22:13:10 UTC (rev 11131)
+++
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2008-10-23
23:27:05 UTC (rev 11132)
@@ -155,17 +155,17 @@
sb.append(s.substring(j));
IFile file = webContent.getFile("long.xhtml");
try {
- boolean save = ResourcesUtils.setBuildAutomatically(false);
+// boolean save = ResourcesUtils.setBuildAutomatically(false);
file.create(new ByteArrayInputStream(sb.toString().getBytes()), true, new
NullProgressMonitor());
long time = System.currentTimeMillis();
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new
NullProgressMonitor());
-
+// project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new
NullProgressMonitor());
+ JobUtils.waitForIdle();
long dt = System.currentTimeMillis() - time;
System.out.println("validated in " + dt);
- ResourcesUtils.setBuildAutomatically(save);
+// ResourcesUtils.setBuildAutomatically(save);
- assertTrue("Validator takes more than 5s (" + (dt/1000d) + ") for
validating generated long.xhtml", dt < 5000);
+ assertTrue("Validator takes more than 5s (" + ((dt-500d)/1000d) + ")
for validating generated long.xhtml", dt < 5000);
} catch (CoreException e) {
JUnitUtils.fail("", e);
}
Show replies by date