Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2015-04-28 17:48:22 +0000
committerThomas Watson2015-04-28 17:48:22 +0000
commit7e4590f268a991c305c642977f69b8ff55dd0df2 (patch)
tree60eb7e4a39a2662a358e11324cf0cb0455e4d12d
parent1a9af5de5f0d30949ed68242361e8dc0c339213b (diff)
downloadrt.equinox.bundles-7e4590f268a991c305c642977f69b8ff55dd0df2.tar.gz
rt.equinox.bundles-7e4590f268a991c305c642977f69b8ff55dd0df2.tar.xz
rt.equinox.bundles-7e4590f268a991c305c642977f69b8ff55dd0df2.zip
Bug 465445 - ContextServiceTest#testRemoteContextNotFound() fails since
I20150422-1000 - Add test that mimics the UA test expectations
-rw-r--r--bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
index 0cd1d384..16442a71 100644
--- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
+++ b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java
@@ -413,6 +413,33 @@ public class ServletTest extends TestCase {
Assert.fail("Expecting java.io.IOException: Premature EOF");
}
+ public void test_ErrorPage11() throws Exception {
+ Servlet servlet = new HttpServlet() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(
+ HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ resp.sendError(403);
+ resp.getOutputStream().flush();
+ }
+ };
+
+ Dictionary<String, Object> props = new Hashtable<String, Object>();
+ props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME, "E10");
+ props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/TestErrorPage11/*");
+ registrations.add(getBundleContext().registerService(Servlet.class, servlet, props));
+
+ try {
+ requestAdvisor.request("TestErrorPage11/a");
+ } catch (IOException e) {
+ // This is expected because of old behavior
+ // TODO is this really the correct behavior though
+ }
+ }
+
public void test_Filter1() throws Exception {
String expected = "bab";
String actual;

Back to the top