You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/02/20 16:04:58 UTC
svn commit: r1661136 -
/felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java
Author: cziegeler
Date: Fri Feb 20 15:04:58 2015
New Revision: 1661136
URL: http://svn.apache.org/r1661136
Log:
FELIX-4060 : Fix test case when bundle is stopped
Modified:
felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java
Modified: felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java?rev=1661136&r1=1661135&r2=1661136&view=diff
==============================================================================
--- felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java (original)
+++ felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java Fri Feb 20 15:04:58 2015
@@ -23,6 +23,7 @@ import static javax.servlet.http.HttpSer
import static javax.servlet.http.HttpServletResponse.SC_OK;
import static javax.servlet.http.HttpServletResponse.SC_PAYMENT_REQUIRED;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -95,7 +96,8 @@ public class HttpJettyTest extends BaseI
bundle.stop();
- assertTrue(destroyLatch.await(5, TimeUnit.SECONDS));
+ // destroy should not be called as the bundle stopped
+ assertFalse(destroyLatch.await(5, TimeUnit.SECONDS));
try
{
@@ -122,16 +124,19 @@ public class HttpJettyTest extends BaseI
HttpContext context = new HttpContext()
{
+ @Override
public String getMimeType(String name)
{
return null;
}
+ @Override
public URL getResource(String name)
{
return null;
}
+ @Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException
{
try
@@ -264,16 +269,19 @@ public class HttpJettyTest extends BaseI
HttpContext context = new HttpContext()
{
+ @Override
public String getMimeType(String name)
{
return null;
}
+ @Override
public URL getResource(String name)
{
return null;
}
+ @Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException
{
if (request.getParameter("setStatus") != null)
@@ -442,11 +450,13 @@ public class HttpJettyTest extends BaseI
HttpContext context = new HttpContext()
{
+ @Override
public String getMimeType(String name)
{
return null;
}
+ @Override
public URL getResource(String name)
{
try
@@ -464,6 +474,7 @@ public class HttpJettyTest extends BaseI
return null;
}
+ @Override
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException
{
return true;