diff options
author | Raymond Auge | 2015-03-19 17:42:50 +0000 |
---|---|---|
committer | Raymond Auge | 2015-03-19 17:42:50 +0000 |
commit | 51dc4efad2bd1c465eae3fec8a7c42c063d7ae05 (patch) | |
tree | 9f21fd324157355e18e9d3e4071ad8b5f11e7dc8 | |
parent | da801f356775376a371a78d157928966cbdf8830 (diff) | |
download | rt.equinox.bundles-51dc4efad2bd1c465eae3fec8a7c42c063d7ae05.tar.gz rt.equinox.bundles-51dc4efad2bd1c465eae3fec8a7c42c063d7ae05.tar.xz rt.equinox.bundles-51dc4efad2bd1c465eae3fec8a7c42c063d7ae05.zip |
Revert "Bug 460720 - test"
This reverts commit 3ae7c681bdaa980fa52970760f2a27b9dcfc2227.
3 files changed, 0 insertions, 97 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 3f30d3e30..9dd254441 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 @@ -51,7 +51,6 @@ import javax.servlet.http.HttpSessionAttributeListener; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener; import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionIdListener; import javax.servlet.http.HttpSessionListener; import junit.framework.TestCase; @@ -62,10 +61,8 @@ import org.eclipse.equinox.http.servlet.tests.bundle.Activator; import org.eclipse.equinox.http.servlet.tests.bundle.BundleAdvisor; import org.eclipse.equinox.http.servlet.tests.bundle.BundleInstaller; import org.eclipse.equinox.http.servlet.tests.util.BaseAsyncServlet; -import org.eclipse.equinox.http.servlet.tests.util.BaseChangeSessionIdServlet; import org.eclipse.equinox.http.servlet.tests.util.BaseHttpContext; import org.eclipse.equinox.http.servlet.tests.util.BaseHttpSessionAttributeListener; -import org.eclipse.equinox.http.servlet.tests.util.BaseHttpSessionIdListener; import org.eclipse.equinox.http.servlet.tests.util.BaseServlet; import org.eclipse.equinox.http.servlet.tests.util.BaseServletContextAttributeListener; import org.eclipse.equinox.http.servlet.tests.util.BaseServletContextListener; @@ -1676,33 +1673,6 @@ public class ServletTest extends TestCase { } } - public void test_Listener8() throws Exception { - BaseHttpSessionIdListener hsil1 = new BaseHttpSessionIdListener(); - - Servlet s1 = new BaseChangeSessionIdServlet("test_Listener8"); - - Collection<ServiceRegistration<?>> registrations = new ArrayList<ServiceRegistration<?>>(); - try { - Dictionary<String, String> listenerProps = new Hashtable<String, String>(); - listenerProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true"); - registrations.add(getBundleContext().registerService(HttpSessionIdListener.class, hsil1, listenerProps)); - - Dictionary<String, String> servletProps1 = new Hashtable<String, String>(); - servletProps1.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME, "S8"); - servletProps1.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/s"); - registrations.add(getBundleContext().registerService(Servlet.class, s1, servletProps1)); - - requestAdvisor.request("s"); - - Assert.assertTrue(hsil1.changed.get()); - } - finally { - for (ServiceRegistration<?> registration : registrations) { - registration.unregister(); - } - } - } - public void test_Async1() throws Exception { Servlet s1 = new BaseAsyncServlet("test_Listener8"); diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseChangeSessionIdServlet.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseChangeSessionIdServlet.java deleted file mode 100644 index dce79ccd3..000000000 --- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseChangeSessionIdServlet.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Raymond Augé and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Raymond Augé <raymond.auge@liferay.com> - Bug 460720 - ******************************************************************************/ - -package org.eclipse.equinox.http.servlet.tests.util; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - - -public class BaseChangeSessionIdServlet extends BaseServlet { - - public BaseChangeSessionIdServlet(String content) { - super(content); - } - - @Override - protected void service( - HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - - request.getSession(true); - - request.changeSessionId(); - - response.getWriter().print(content); - } - -} diff --git a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseHttpSessionIdListener.java b/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseHttpSessionIdListener.java deleted file mode 100644 index ce62039a2..000000000 --- a/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/util/BaseHttpSessionIdListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Raymond Augé and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Raymond Augé <raymond.auge@liferay.com> - Bug 460720 - ******************************************************************************/ - -package org.eclipse.equinox.http.servlet.tests.util; - -import java.util.concurrent.atomic.AtomicBoolean; - -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionIdListener; - -public class BaseHttpSessionIdListener implements HttpSessionIdListener { - - public AtomicBoolean changed = new AtomicBoolean(false); - - @Override - public void sessionIdChanged(HttpSessionEvent event, String oldSessionId) { - changed.set(true); - } - -} |