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());


Reply via email to