mirror of https://github.com/apache/jmeter.git
StringIndexOutOfBoundsException at SampleResult.getSampleLabel() if key_on_threadname=false when using Statistical mode
Bugzilla Id: 5473 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1461380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b10c19ad
commit
fa1260e00f
|
|
@ -56,21 +56,30 @@ public class StatisticalSampleResult extends SampleResult implements
|
|||
* Create a statistical sample result from an ordinary sample result.
|
||||
*
|
||||
* @param res the sample result
|
||||
* @param keyOnThreadName true if key includes threadName, false if threadGroup
|
||||
*/
|
||||
public StatisticalSampleResult(SampleResult res, boolean keyOnThreadName) {
|
||||
public StatisticalSampleResult(SampleResult res) {
|
||||
// Copy data that is shared between samples (i.e. the key items):
|
||||
setSampleLabel(res.getSampleLabel());
|
||||
|
||||
if (keyOnThreadName) {
|
||||
setThreadName(res.getThreadName());
|
||||
}
|
||||
setThreadName(res.getThreadName());
|
||||
|
||||
setSuccessful(true); // Assume result is OK
|
||||
setSampleCount(0); // because we add the sample count in later
|
||||
elapsed = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a statistical sample result from an ordinary sample result.
|
||||
*
|
||||
* @param res the sample result
|
||||
* @param unused no longer used
|
||||
* @deprecated no longer necessary; use {@link #StatisticalSampleResult(SampleResult)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public StatisticalSampleResult(SampleResult res, boolean unused) {
|
||||
this(res);
|
||||
}
|
||||
|
||||
public void add(SampleResult res) {
|
||||
// Add Sample Counter
|
||||
setSampleCount(getSampleCount() + res.getSampleCount());
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public class StatisticalSampleSender extends AbstractSampleSender implements Ser
|
|||
String key = StatisticalSampleResult.getKey(e, keyOnThreadName);
|
||||
StatisticalSampleResult statResult = sampleTable.get(key);
|
||||
if (statResult == null) {
|
||||
statResult = new StatisticalSampleResult(e.getResult(), keyOnThreadName);
|
||||
statResult = new StatisticalSampleResult(e.getResult());
|
||||
// store the new statistical result collector
|
||||
sampleTable.put(key, statResult);
|
||||
// add a new wrapper samplevent
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ This does not affect JMeter operation.
|
|||
<h3>Listeners</h3>
|
||||
<ul>
|
||||
<li><bugzilla>54589</bugzilla> - View Results Tree have a lot of Garbage characters if html page uses double-byte charset</li>
|
||||
<li><bugzilla>5473</bugzilla> - StringIndexOutOfBoundsException at SampleResult.getSampleLabel() if key_on_threadname=false when using Statistical mode</li>
|
||||
</ul>
|
||||
|
||||
<h3>Timers, Assertions, Config, Pre- & Post-Processors</h3>
|
||||
|
|
|
|||
Loading…
Reference in New Issue