Bug 22820 - max value on counter cannot be cleared
max value on counter cannot be cleared
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
1.9.1
PC Windows XP
: P3 minor (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2003-08-29 18:01 UTC by Brandon Ulrich
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Ulrich 2003-08-29 18:01:32 UTC
The Counter pre-processor's maximum value cannot be cleared once set.  This 
tends to occur when initially limiting a counter's value to 1 during testing, 
then being unable to clear it later.  The other fields on the Counter form 
work as expected.

The workaround is to type a high value (9999) in the max field.

To reproduce:
1. Add Thread Group
2. Add Pre-Processer > Counter to Thread Group.
3. Set Maximum Value to 9
4. Click Thread Group to change focus.
5. Click  back to Counter, delete Maximum Value of 9.
6. Click Thread Group to change focus
7. Click back to Counter and note Maximum remains set to 9, instead of blank 
as expected.
Comment 1 prabhu 2004-02-06 11:50:06 UTC
Yes your right ,  I found the problem in CounterConfigGui.java, this problem 
would be solved by adding  following patch.

    /**
     * Modifies a given TestElement to mirror the data in the gui components.
     * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement
(TestElement)
     */
    public void modifyTestElement(TestElement c)
    {
        if (c instanceof CounterConfig)
        {
            CounterConfig config = (CounterConfig) c;
            config.setStart(startField.getText());
           /* if (endField.getText().length() > 0)
            {
                config.setEnd(endField.getText());
            }*/
            config.setEnd(endField.getText());
            config.setIncrement(incrField.getText());
            config.setVarName(varNameField.getText());
            config.setIsPerUser(perUserField.isSelected());
        }
        super.configureTestElement(c);
    }

Regards,
Prabhu
Comment 2 Sebb 2004-05-21 00:23:16 UTC
Fixed in branch 2.0