[webbeans-commits] Webbeans SVN: r1812 - in tck/trunk: impl and 6 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Mar 8 08:58:53 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-03-08 08:58:53 -0400 (Sun, 08 Mar 2009)
New Revision: 1812
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/AbstractConversationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationStatusServlet.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/JsfConversationLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/MultiRequestConversationContextTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/beans.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/home.jsf
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/web.xml
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java
Modified:
tck/trunk/impl/pom.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
tck/trunk/pom.xml
Log:
some tests for coversations, use httpclient
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/impl/pom.xml 2009-03-08 12:58:53 UTC (rev 1812)
@@ -87,6 +87,11 @@
<artifactId>persistence-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+
</dependencies>
<build>
@@ -196,23 +201,11 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <executions>
- <execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
<defaultGoal>compile</defaultGoal>
</build>
</profile>
+
<profile>
<id>write-artifacts-to-disk</id>
<activation>
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -1,85 +0,0 @@
-package org.jboss.jsr299.tck.impl.util;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-
-public class Servlet
-{
-
- public static abstract class ServletConnection
- {
-
- private final long connectTimeout;
- private final URL url;
- private HttpURLConnection connection;
-
- public ServletConnection(long connectTimeout, URL url)
- {
- this.connectTimeout = connectTimeout;
- this.url = url;
- }
-
- private void init() throws IOException
- {
- long timeoutTime = System.currentTimeMillis() + connectTimeout;
- boolean interrupted = false;
- while (timeoutTime > System.currentTimeMillis())
- {
- URLConnection connection = url.openConnection();
- if (!(connection instanceof HttpURLConnection))
- {
- throw new IllegalStateException("Not an http connection! " + connection);
- }
- this.connection = (HttpURLConnection) connection;
- this.connection.setUseCaches(false);
- this.connection.setDefaultUseCaches(false);
- connection.connect();
- if (this.connection.getResponseCode() == HttpURLConnection.HTTP_OK)
- {
- return;
- }
- try
- {
- Thread.sleep(200);
- }
- catch (InterruptedException e)
- {
- interrupted = true;
- }
- }
- if (interrupted)
- {
- Thread.currentThread().interrupt();
- }
- }
-
- protected HttpURLConnection getConnection()
- {
- return connection;
- }
-
- private void cleanup()
- {
- this.connection.disconnect();
- }
-
- protected abstract void execute() throws Exception;
-
- public void run() throws Exception
- {
- try
- {
- init();
- execute();
- }
- finally
- {
- cleanup();
- }
- }
-
- }
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/AbstractConversationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/AbstractConversationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/AbstractConversationTest.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,62 @@
+package org.jboss.jsr299.tck.tests.context.conversation;
+
+import java.io.ObjectInputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+
+public abstract class AbstractConversationTest extends AbstractDeclarativeTest
+{
+
+ private static final long TIMEOUT = 200;
+
+ protected String getCid(HttpClient client) throws Exception
+ {
+ HttpMethod method = new GetMethod(getConversationStatusPath("cid"));
+ ObjectInputStream ois = null;
+ try
+ {
+ client.executeMethod(method);
+ ois = new ObjectInputStream(method.getResponseBodyAsStream());
+ return (String) ois.readObject();
+ }
+ finally
+ {
+ if (ois != null)
+ {
+ ois.close();
+ }
+ method.releaseConnection();
+ }
+
+ }
+
+ protected String getConversationStatusPath(String method)
+ {
+ return super.getContextPath() + "conversation-status?method=" + method;
+ }
+
+ protected URL getConversationStatusURL(String method) throws MalformedURLException
+ {
+ return new URL(getConversationStatusPath(method));
+ }
+
+ protected void request(HttpClient client, String viewId) throws Exception
+ {
+ HttpMethod method = new GetMethod(getContextPath() + "/home.jsf");
+ try
+ {
+ client.executeMethod(method);
+ assert method.getStatusCode() == 200;
+ }
+ finally
+ {
+ method.releaseConnection();
+ }
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/AbstractConversationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationContextTest.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -1,7 +1,10 @@
package org.jboss.jsr299.tck.tests.context.conversation;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import javax.context.Conversation;
+
import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.testng.annotations.Test;
/**
@@ -10,138 +13,32 @@
*
* Spec version: PRD2
*/
+ at Artifact
public class ConversationContextTest extends AbstractDeclarativeTest
{
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "a")
- public void testContextActiveFromBeginningOfApplyRequestValuesPhasetoResponseCompleteForJsfRequest()
- {
- assert false;
- }
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "b")
- public void testContextActiveDuringRenderResponsePhaseForNonFacesJsfRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "c")
- public void testJsfRequestHasExactlyOneAssociatedConversation()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "d")
- public void testAssociatedConversationOfJsfRequestIsDeterminedAtEndOfRestoreViewPhase()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "d")
- public void testAssociatedConversationOfJsfRequestDoesNotChangeDuringRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
+ @Test(groups = { "contexts" })
@SpecAssertion(section = "8.5.4", id = "e")
public void testDefaultConversationIsTransient()
{
- assert false;
+ assert !getCurrentManager().getInstanceByType(Conversation.class).isLongRunning();
}
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "h")
- public void testConversationsHaveUniqueStringIdentifiers()
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "ha")
+ public void testConversationIdMayBeSetByApplication()
{
- assert false;
+ Conversation conversation = getCurrentManager().getInstanceByType(Conversation.class);
+ conversation.begin("foo");
}
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "j")
- public void testTransientConversationIsDestroyedAtEndOfJsfRequest()
+
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "hb")
+ public void testConversationIdSetByContainer()
{
- assert false;
+ Conversation conversation = getCurrentManager().getInstanceByType(Conversation.class);
+ conversation.begin();
+ assert conversation.getId() != null;
}
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "j")
- public void testTransientConversationContextIsDestroyedAtEndOfJsfRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "k")
- public void testLongRunningConversationNotDestroyedAtEndOfJsfRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "l")
- public void testLongRunningConversationOfJsfRenderingRequestIsPropagatedToRequestFromRenderedPage()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "m")
- public void testLongRunningConversationOfJsfRedirectIsPropagatedToNonFacesRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "n")
- public void testLongRunningConversationManuallyPropagatedToNonFacesRequest()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "o")
- public void testNewTransientRequestIsCreatedWhenNoConversationIsPropagated()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "p")
- public void testLongRunningConversationsMayNotCrossHttpSessions()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "q")
- public void testAllLongRunningConversationContextsOfInvalidatedHttpSessionAreDestroyed()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "r")
- public void testManagerCanDestroyOrphanedLongRunningConversations()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "s")
- public void testNewTransientConversationIsCreatedWhenConversationCannotBeRestored()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "8.5.4", id = "u")
- public void testConcurrentRequestsToLongRunningConversationsAreHandled()
- {
- assert false;
- }
}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationStatusServlet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationStatusServlet.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationStatusServlet.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,39 @@
+package org.jboss.jsr299.tck.tests.context.conversation;
+
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+import javax.context.Conversation;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.jsr299.tck.impl.ConfigurationImpl;
+
+public class ConversationStatusServlet extends HttpServlet
+{
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ String method = req.getParameter("method");
+ if ("cid".equals(method))
+ {
+ serializeToResponse(ConfigurationImpl.get().getManagers().getManager().getInstanceByType(Conversation.class).getId(), resp);
+ }
+ else
+ {
+ resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ private void serializeToResponse(Object object, HttpServletResponse resp) throws IOException
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(resp.getOutputStream());
+ oos.writeObject(object);
+ oos.flush();
+ oos.close();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ConversationStatusServlet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/JsfConversationLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/JsfConversationLifecycleTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/JsfConversationLifecycleTest.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,133 @@
+package org.jboss.jsr299.tck.tests.context.conversation;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
+ */
+public class JsfConversationLifecycleTest extends AbstractDeclarativeTest
+{
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "a")
+ public void testContextActiveFromBeginningOfApplyRequestValuesPhasetoResponseCompleteForJsfRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "b")
+ public void testContextActiveDuringRenderResponsePhaseForNonFacesJsfRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "c")
+ public void testJsfRequestHasExactlyOneAssociatedConversation()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "d")
+ public void testAssociatedConversationOfJsfRequestIsDeterminedAtEndOfRestoreViewPhase()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "d")
+ public void testAssociatedConversationOfJsfRequestDoesNotChangeDuringRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "j")
+ public void testTransientConversationIsDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "j")
+ public void testTransientConversationContextIsDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "k")
+ public void testLongRunningConversationNotDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "l")
+ public void testLongRunningConversationOfJsfRenderingRequestIsPropagatedToRequestFromRenderedPage()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "m")
+ public void testLongRunningConversationOfJsfRedirectIsPropagatedToNonFacesRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "n")
+ public void testLongRunningConversationManuallyPropagatedToNonFacesRequest()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "o")
+ public void testNewTransientRequestIsCreatedWhenNoConversationIsPropagated()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "p")
+ public void testLongRunningConversationsMayNotCrossHttpSessions()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "q")
+ public void testAllLongRunningConversationContextsOfInvalidatedHttpSessionAreDestroyed()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "r")
+ public void testManagerCanDestroyOrphanedLongRunningConversations()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "s")
+ public void testNewTransientConversationIsCreatedWhenConversationCannotBeRestored()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "u")
+ public void testConcurrentRequestsToLongRunningConversationsAreHandled()
+ {
+ assert false;
+ }
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/JsfConversationLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/MultiRequestConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/MultiRequestConversationContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/MultiRequestConversationContextTest.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,39 @@
+package org.jboss.jsr299.tck.tests.context.conversation;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
+import org.jboss.jsr299.tck.impl.packaging.Resource;
+import org.jboss.jsr299.tck.impl.packaging.Resources;
+import org.jboss.jsr299.tck.impl.packaging.war.WarArtifactDescriptor;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
+ */
+ at Artifact
+ at IntegrationTest(runLocally=true)
+ at Resources({
+ @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
+ @Resource(destination="home.jspx", source="home.jsf")
+})
+public class MultiRequestConversationContextTest extends AbstractConversationTest
+{
+
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "8.5.4", id = "hb")
+ public void testConversationIdSetByContainerIsUnique() throws Exception
+ {
+ HttpClient client = new HttpClient();
+ request(client, "/home.jsf");
+ String cid1 = getCid(client);
+ request(client, "/home.jsf");
+ String cid2 = getCid(client);
+ assert !cid1.equals(cid2);
+ }
+
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/MultiRequestConversationContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java 2009-03-08 12:58:53 UTC (rev 1812)
@@ -1,10 +1,8 @@
package org.jboss.jsr299.tck.tests.lookup.nonContextual.servlet;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.servlet.http.HttpServletResponse;
-
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.methods.GetMethod;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
@@ -12,7 +10,6 @@
import org.jboss.jsr299.tck.impl.packaging.Resource;
import org.jboss.jsr299.tck.impl.packaging.Resources;
import org.jboss.jsr299.tck.impl.packaging.war.WarArtifactDescriptor;
-import org.jboss.jsr299.tck.impl.util.Servlet;
import org.testng.annotations.Test;
@Artifact
@@ -27,16 +24,9 @@
@SpecAssertion(section = "5.12.3", id = "a")
public void testInjectionIntoServlet() throws Exception
{
- new Servlet.ServletConnection(getCurrentConfiguration().getConnectTimeout(), new URL(getContextPath()))
- {
-
- @Override
- protected void execute() throws IOException
- {
- assert getConnection().getResponseCode() == HttpServletResponse.SC_OK;
- }
-
- }.run();
+ HttpClient client = new HttpClient();
+ HttpMethod method = new GetMethod(getContextPath());
+ assert client.executeMethod(method) == 200;
}
}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/beans.xml 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.jsr299.tck.tests.context.dependent">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/home.jsf
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/home.jsf (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/home.jsf 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="2.0">
+ <jsp:output doctype-root-element="html"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+ <jsp:directive.page contentType="text/html"/>
+ <html>
+ <head>
+ </head>
+ <body>
+
+ </body>
+ </html>
+</jsp:root>
+
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/home.jsf
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/web.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/web.xml 2009-03-08 12:58:53 UTC (rev 1812)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>JSR-299 TCK</display-name>
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.jspx</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Conversation Status Servlet</servlet-name>
+ <servlet-class>org.jboss.jsr299.tck.tests.context.conversation.ConversationStatusServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Conversation Status Servlet</servlet-name>
+ <url-pattern>/conversation-status</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/context/conversation/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-08 12:58:53 UTC (rev 1812)
@@ -4971,10 +4971,14 @@
<text>A long-running conversation may be marked transient by calling Conversation.end()</text>
</assertion>
- <assertion id="h">
- <text>All long-running conversations have a string-valued unique identifier, which may be set by the application when the conversation is marked long-running, or generated by the container</text>
+ <assertion id="ha">
+ <text>All long-running conversations have a string-valued unique identifier, _which may be set by the application_ when the conversation is marked long-running~, or generated by the container~</text>
</assertion>
+ <assertion id="hb">
+ <text>All long-running conversations have a string-valued unique identifier, ~which may be set by the application when the conversation is marked long-running,~ or generated by the container</text>
+ </assertion>
+
<assertion id="i">
<text>The container provides a built-in bean with bean type javax.context.Conversation, scope @RequestScoped, deployment type @Standard and binding @Current, named javax.context.conversation</text>
</assertion>
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-03-07 23:09:02 UTC (rev 1811)
+++ tck/trunk/pom.xml 2009-03-08 12:58:53 UTC (rev 1812)
@@ -130,8 +130,12 @@
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
-
</dependencies>
</dependencyManagement>
More information about the weld-commits
mailing list