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 2018/02/24 20:14:01 UTC
svn commit: r1825273 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Author: pmouawad
Date: Sat Feb 24 20:14:01 2018
New Revision: 1825273
URL: http://svn.apache.org/viewvc?rev=1825273&view=rev
Log:
Rename constant as its name was confusing
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1825273&r1=1825272&r2=1825273&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java Sat Feb 24 20:14:01 2018
@@ -175,7 +175,7 @@ public class HTTPHC4Impl extends HTTPHCA
private static final String CONTEXT_ATTRIBUTE_AUTH_MANAGER = "__jmeter.A_M__";
- private static final String CONTEXT_ATTRIBUTE_USER_TOKEN = "__jmeter.U_T__"; //$NON-NLS-1$
+ private static final String JMETER_VARIABLE_USER_TOKEN = "__jmeter.U_T__"; //$NON-NLS-1$
static final String CONTEXT_ATTRIBUTE_SAMPLER_RESULT_TOKEN = "__jmeter.S_R__"; //$NON-NLS-1$
@@ -723,11 +723,11 @@ public class HTTPHC4Impl extends HTTPHCA
private void extractClientContextAfterSample(HttpContext localContext) {
Object userToken = localContext.getAttribute(HttpClientContext.USER_TOKEN);
if(userToken != null) {
- log.debug("Extracted from HttpContext user token:{} storing it as JMeter variable:{}", userToken, CONTEXT_ATTRIBUTE_USER_TOKEN);
+ log.debug("Extracted from HttpContext user token:{} storing it as JMeter variable:{}", userToken, JMETER_VARIABLE_USER_TOKEN);
// During recording JMeterContextService.getContext().getVariables() is null
JMeterVariables jMeterVariables = JMeterContextService.getContext().getVariables();
if (jMeterVariables != null) {
- jMeterVariables.putObject(CONTEXT_ATTRIBUTE_USER_TOKEN, userToken);
+ jMeterVariables.putObject(JMETER_VARIABLE_USER_TOKEN, userToken);
}
}
}
@@ -742,10 +742,10 @@ public class HTTPHC4Impl extends HTTPHCA
// During recording JMeterContextService.getContext().getVariables() is null
JMeterVariables jMeterVariables = JMeterContextService.getContext().getVariables();
if(jMeterVariables != null) {
- userToken = jMeterVariables.getObject(CONTEXT_ATTRIBUTE_USER_TOKEN);
+ userToken = jMeterVariables.getObject(JMETER_VARIABLE_USER_TOKEN);
}
if(userToken != null) {
- log.debug("Found user token:{} as JMeter variable:{}, storing it in HttpContext", userToken, CONTEXT_ATTRIBUTE_USER_TOKEN);
+ log.debug("Found user token:{} as JMeter variable:{}, storing it in HttpContext", userToken, JMETER_VARIABLE_USER_TOKEN);
localContext.setAttribute(HttpClientContext.USER_TOKEN, userToken);
} else {
// It would be better to create a ClientSessionManager that would compute this value