Bug 34096 - Duplicate samples not eliminated when writing to CSV files

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@712443 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2008-11-08 22:35:12 +00:00
parent 06a696255d
commit 52b27f7789
2 changed files with 11 additions and 18 deletions

View File

@ -456,13 +456,20 @@ public class ResultCollector extends AbstractListenerElement implements SampleLi
if (isSampleWanted(result.isSuccessful())) {
sendToVisualizer(result);
if ( out != null) {// no point otherwise
if (out != null && !isResultMarked(result) && !this.isStats) {
SampleSaveConfiguration config = getSaveConfig();
result.setSaveConfig(config);
try {
if (config.saveAsXml()) {
recordResult(event);
} else {
if (SaveService.isSaveTestLogFormat20()) {
if (serializer == null) {
serializer = new DefaultConfigurationSerializer();
}
out.write(OldSaveService.getSerializedSampleResult(result, serializer, config));
} else { // !LogFormat20
SaveService.saveSampleResult(event, out);
}
} else { // !saveAsXml
String savee = CSVSaveService.resultToDelimitedString(event);
out.println(savee);
}
@ -479,21 +486,6 @@ public class ResultCollector extends AbstractListenerElement implements SampleLi
}
}
// Only called if out != null
private void recordResult(SampleEvent event) throws Exception {
SampleResult result = event.getResult();
if (!isResultMarked(result) && !this.isStats) {
if (SaveService.isSaveTestLogFormat20()) {
if (serializer == null) {
serializer = new DefaultConfigurationSerializer();
}
out.write(OldSaveService.getSerializedSampleResult(result, serializer, getSaveConfig()));
} else {
SaveService.saveSampleResult(event, out);
}
}
}
/**
* recordStats is used to save statistics generated by visualizers
*

View File

@ -154,6 +154,7 @@ These are implemented in the AbstractTestElement class which all elements should
<li>TCP sampler now calls setupTest() and teardownTest() methods</li>
<li>Bug 45458 - Point to Point JMS in combination with authentication</li>
<li>Bug 45460 - JMS TestPlan elements depend on resource property</li>
<li>Bug 34096 - Duplicate samples not eliminated when writing to CSV files</li>
</ul>
<h3>Improvements</h3>