improved test timing

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2523 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-11-16 23:53:42 +00:00
parent ff2239a2ba
commit 6ca798c49a
3 changed files with 3 additions and 4 deletions

View File

@ -89,7 +89,7 @@ public class MonitoredDirAppProviderRuntimeUpdatesTest
* Simple webapp deployment after startup of server, and then removal of the webapp.
*/
@Test
public void testAfterStartupThenUpdateContext() throws IOException
public void testAfterStartupThenUpdateContext() throws Exception
{
jetty.copyWebapp("foo-webapp-1.war","foo.war");
jetty.copyContext("foo.xml","foo.xml");
@ -101,6 +101,7 @@ public class MonitoredDirAppProviderRuntimeUpdatesTest
// Test that webapp response contains "-1"
jetty.assertResponseContains("/foo/info","FooServlet-1");
Thread.sleep(1000);
System.out.println("Updating war files");
jetty.copyContext("foo.xml","foo.xml"); // essentially "touch" the context xml
jetty.copyWebapp("foo-webapp-2.war","foo.war");

View File

@ -63,7 +63,7 @@ public abstract class ConnectorTimeoutTest extends HttpServerTestFixture
assertEquals(-1, is.read());
Assert.assertTrue(System.currentTimeMillis()-start>200);
Assert.assertTrue(System.currentTimeMillis()-start<1000);
Assert.assertTrue(System.currentTimeMillis()-start<5000);
}

View File

@ -13,12 +13,10 @@
package org.eclipse.jetty.util.thread;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;