You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/10/25 16:48:23 UTC

svn commit: r707850 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java

Author: sebb
Date: Sat Oct 25 07:48:23 2008
New Revision: 707850

URL: http://svn.apache.org/viewvc?rev=707850&view=rev
Log:
Ensure cookie policy is initialised (as would be done in a real test)

Modified:
    jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java?rev=707850&r1=707849&r2=707850&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java Sat Oct 25 07:48:23 2008
@@ -42,6 +42,7 @@
             jmctx = JMeterContextService.getContext();
             man = new CookieManager();
             man.setThreadContext(jmctx);
+            man.testStarted();// This is needed in order to set up the cookie policy
         }
 
         public void testRemoveCookie() throws Exception {
@@ -284,6 +285,7 @@
         
         public void testCookiePolicy2109() throws Exception {
             man.setCookiePolicy(CookiePolicy.RFC_2109);
+            man.testStarted(); // ensure policy is picked up
             URL url = new URL("http://order.now/sub1/moo.html");
             man.addCookieFromHeader("test1=moo1;", url);
             man.addCookieFromHeader("test2=moo2;path=/sub1", url);
@@ -306,6 +308,7 @@
 
         public void testCookiePolicyNetscape() throws Exception {
             man.setCookiePolicy(CookiePolicy.NETSCAPE);
+            man.testStarted(); // ensure policy is picked up
             URL url = new URL("http://order.now/sub1/moo.html");
             man.addCookieFromHeader("test1=moo1;", url);
             man.addCookieFromHeader("test2=moo2;path=/sub1", url);
@@ -328,6 +331,7 @@
 
         public void testCookiePolicyIgnore() throws Exception {
             man.setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
+            man.testStarted(); // ensure policy is picked up
             URL url = new URL("http://order.now/sub1/moo.html");
             man.addCookieFromHeader("test1=moo1;", url);
             man.addCookieFromHeader("test2=moo2;path=/sub1", url);



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org