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/05/20 08:25:28 UTC
svn commit: r1680459 - in
/felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest:
HttpJettyTest.java HttpServiceRuntimeTest.java
Author: cziegeler
Date: Wed May 20 06:25:28 2015
New Revision: 1680459
URL: http://svn.apache.org/r1680459
Log:
Correct test cases
Modified:
felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpJettyTest.java
felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpServiceRuntimeTest.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=1680459&r1=1680458&r2=1680459&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 Wed May 20 06:25:28 2015
@@ -23,7 +23,6 @@ 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;
@@ -96,8 +95,7 @@ public class HttpJettyTest extends BaseI
bundle.stop();
- // destroy should not be called as the bundle stopped
- assertFalse(destroyLatch.await(5, TimeUnit.SECONDS));
+ assertTrue(destroyLatch.await(5, TimeUnit.SECONDS));
try
{
Modified: felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpServiceRuntimeTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpServiceRuntimeTest.java?rev=1680459&r1=1680458&r2=1680459&view=diff
==============================================================================
--- felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpServiceRuntimeTest.java (original)
+++ felix/trunk/http/itest/src/test/java/org/apache/felix/http/itest/HttpServiceRuntimeTest.java Wed May 20 06:25:28 2015
@@ -1024,7 +1024,7 @@ public class HttpServiceRuntimeTest exte
// As specified in OSGi Compendium Release 6, Chapter 140.4.1
@Test
- public void multipleErrorPagesForSameExceptionsChoosenByServiceRankingRules() throws InterruptedException
+ public void multipleErrorPagesForSameErrorCodeChoosenByServiceRankingRules() throws InterruptedException
{
registerErrorPage("error page 1", asList(NullPointerException.class.getName(), "500"));
@@ -1059,14 +1059,14 @@ public class HttpServiceRuntimeTest exte
assertArrayEquals(new long[] { 500 }, defaultContext.errorPageDTOs[0].errorCodes);
assertArrayEquals(new String[] { IllegalArgumentException.class.getName() }, defaultContext.errorPageDTOs[0].exceptions);
assertEquals("error page 1", defaultContext.errorPageDTOs[1].name);
- assertArrayEquals(new long[] { 500 }, defaultContext.errorPageDTOs[1].errorCodes);
+ assertEquals(0, defaultContext.errorPageDTOs[1].errorCodes.length);
assertArrayEquals(new String[] { NullPointerException.class.getName() }, defaultContext.errorPageDTOs[1].exceptions);
assertEquals(1, runtimeWithShadowedErrorPage.failedErrorPageDTOs.length);
FailedErrorPageDTO failedErrorPageDTO = runtimeWithShadowedErrorPage.failedErrorPageDTOs[0];
assertEquals("error page 1", failedErrorPageDTO.name);
assertArrayEquals(new long[] { 500 }, failedErrorPageDTO.errorCodes);
- assertArrayEquals(new String[] { NullPointerException.class.getName() }, failedErrorPageDTO.exceptions);
+ assertEquals(0, failedErrorPageDTO.exceptions.length);
assertEquals(FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE, failedErrorPageDTO.failureReason);
higherRankingServlet.unregister();