diff --git a/test-jetty-webapp/src/main/java/com/acme/CookieDump.java b/test-jetty-webapp/src/main/java/com/acme/CookieDump.java index 5e045227d77..46145898ecc 100644 --- a/test-jetty-webapp/src/main/java/com/acme/CookieDump.java +++ b/test-jetty-webapp/src/main/java/com/acme/CookieDump.java @@ -19,6 +19,7 @@ package com.acme; import java.io.IOException; import java.io.PrintWriter; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.Cookie; @@ -121,4 +122,21 @@ public class CookieDump extends HttpServlet return string; } + @Override + public void destroy() + { + // For testing --stop with STOP.WAIT handling of the jetty-start behavior. + if (Boolean.getBoolean("test.slow.destroy")) + { + try + { + TimeUnit.SECONDS.sleep(10); + } + catch (InterruptedException e) + { + // ignore + } + } + super.destroy(); + } } diff --git a/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java b/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java index abacf87805c..67caa063480 100644 --- a/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java +++ b/test-jetty-webapp/src/main/java/com/acme/HelloWorld.java @@ -67,8 +67,4 @@ public class HelloWorld extends HttpServlet getServletContext().log("exception",e); } } - - - - }