sebb 2004/10/08 13:59:03 Modified: src/core/org/apache/jmeter/threads Tag: rel-2_0 JMeterThread.java Log: Tidy up saving of sample results for while controller Revision Changes Path No revision No revision 1.48.2.5 +6 -9 jakarta-jmeter/src/core/org/apache/jmeter/threads/JMeterThread.java Index: JMeterThread.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/threads/JMeterThread.java,v retrieving revision 1.48.2.4 retrieving revision 1.48.2.5 diff -u -r1.48.2.4 -r1.48.2.5 --- JMeterThread.java 6 Oct 2004 01:58:26 -0000 1.48.2.4 +++ JMeterThread.java 8 Oct 2004 20:59:03 -0000 1.48.2.5 @@ -82,7 +82,6 @@ public static final String PACKAGE_OBJECT = "JMeterThread.pack"; // $NON-NLS-1$ public static final String LAST_SAMPLE_OK = "JMeterThread.last_sample_ok"; // $NON-NLS-1$ - public static final String ALL_SAMPLES_OK = "JMeterThread.all_samples_ok"; // $NON-NLS-1$ public JMeterThread() { @@ -221,6 +220,8 @@ threadContext = JMeterContextService.getContext(); threadContext.setVariables(threadVars); threadContext.setThreadNum(getThreadNum()); + // initialise + threadContext.getVariables().put(LAST_SAMPLE_OK,"true"); // $NON-NLS-1$ testTree.traverse(compiler); running = true; //listeners = controller.getListeners(); @@ -393,8 +394,6 @@ private void checkAssertions(List assertions, SampleResult result) { Iterator iter = assertions.iterator(); - boolean last_sample_ok=true; - boolean all_samples_ok=true; while (iter.hasNext()) { Assertion assertion= (Assertion)iter.next(); @@ -404,11 +403,9 @@ result.isSuccessful() && !(assertionResult.isError() || assertionResult.isFailure())); result.addAssertionResult(assertionResult); - last_sample_ok = result.isSuccessful(); - all_samples_ok &= last_sample_ok; } - threadContext.getVariables().put(LAST_SAMPLE_OK,JOrphanUtils.booleanToString(last_sample_ok)); - threadContext.getVariables().put(ALL_SAMPLES_OK,JOrphanUtils.booleanToString(all_samples_ok)); + threadContext.getVariables().put(LAST_SAMPLE_OK, + JOrphanUtils.booleanToString(result.isSuccessful())); } private void runPostProcessors(List extractors)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]