You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/02/26 01:22:02 UTC

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

Author: pmouawad
Date: Fri Feb 26 00:22:02 2016
New Revision: 1732404

URL: http://svn.apache.org/viewvc?rev=1732404&view=rev
Log:
Bug 59071 - CookieManager : Defaults used by CookieManager (after Bug 58756) are wrong
Fix test failure
Bugzilla Id: 59071

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

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java?rev=1732404&r1=1732403&r2=1732404&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCookieManager.java Fri Feb 26 00:22:02 2016
@@ -287,6 +287,8 @@ public class TestCookieManager extends J
         // Test multi-cookie header handling
         @Test
         public void testCookies1() throws Exception {
+            man.setCookiePolicy(CookieSpecs.DEFAULT);
+            man.testStarted(); // ensure policy is picked up
             URL url = new URL("http://a.b.c.d/testCookies1");
             man.addCookieFromHeader("test1=1; comment=\"how,now\", test2=2; version=1", url);
             assertEquals(2,man.getCookieCount());
@@ -312,6 +314,8 @@ public class TestCookieManager extends J
         
         @Test
         public void testCookies3() throws Exception {
+            man.setCookiePolicy(CookieSpecs.DEFAULT);
+            man.testStarted(); // ensure policy is picked up
             URL url = new URL("https://a.b.c.d/testCookies2");
             man.addCookieFromHeader("test1=1;secure, test2=2;secure; version=1", url);
             assertEquals(2,man.getCookieCount());