Using Jmeter 2.12, what could cause the cookies to fail to reset during a JMeter Loop Controller? I've tried everything I can think of, but each time through the loop, one of the cookies from a previous login still remains. It doesn't seem to actually clear the cookies.
Here is how I put together my loop:
Thread Group 1
-- Loop Controller (3x)
-- Simple Controller
-- HTTP Header Manager
-- HTTP Cookie Manger (with 'Clear cookies each iteration?' enabled)
-- BeanShell sampler - with code that tries to clear all cookies
-- HTTP /login (gets cookies and auth headers)
-- ... various HTTP Samplers ...
-- HTTP /logout
I tried adding a Beanshell sampler with this code (as shown above) but it doesn't seem to do anything:
import org.apache.jmeter.protocol.http.control.CookieManager;
import org.apache.jmeter.protocol.http.control.HeaderManager;
CookieManager cManager = sampler.getCookieManager();
cManager.clear();
HeaderManager hManager = sampler.getHeaderManager();
hManager.clear();