mirror of https://github.com/apache/jmeter.git
				
				
				
			Bug 55027 - Test Action regression, duration value are not record
Bugzilla Id: 55027 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1487615 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
		
							parent
							
								
									e1c293599f
								
							
						
					
					
						commit
						ae40b4e00e
					
				| 
						 | 
					@ -20,8 +20,6 @@ package org.apache.jmeter.sampler.gui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.awt.event.ActionEvent;
 | 
					import java.awt.event.ActionEvent;
 | 
				
			||||||
import java.awt.event.ActionListener;
 | 
					import java.awt.event.ActionListener;
 | 
				
			||||||
import java.awt.event.FocusEvent;
 | 
					 | 
				
			||||||
import java.awt.event.FocusListener;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.swing.ButtonGroup;
 | 
					import javax.swing.ButtonGroup;
 | 
				
			||||||
import javax.swing.DefaultComboBoxModel;
 | 
					import javax.swing.DefaultComboBoxModel;
 | 
				
			||||||
| 
						 | 
					@ -61,8 +59,6 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private int action;
 | 
					    private int action;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private String durationString;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // String in the panel
 | 
					    // String in the panel
 | 
				
			||||||
    // Do not make these static, otherwise language changes don't work
 | 
					    // Do not make these static, otherwise language changes don't work
 | 
				
			||||||
    private final String targetLabel = JMeterUtils.getResString("test_action_target"); // $NON-NLS-1$
 | 
					    private final String targetLabel = JMeterUtils.getResString("test_action_target"); // $NON-NLS-1$
 | 
				
			||||||
| 
						 | 
					@ -87,7 +83,6 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
        super();
 | 
					        super();
 | 
				
			||||||
        target = TestAction.THREAD;
 | 
					        target = TestAction.THREAD;
 | 
				
			||||||
        action = TestAction.PAUSE;
 | 
					        action = TestAction.PAUSE;
 | 
				
			||||||
        durationString = ""; // $NON-NLS-1$
 | 
					 | 
				
			||||||
        init();
 | 
					        init();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -118,8 +113,7 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
            restartNextLoopButton.setSelected(true);
 | 
					            restartNextLoopButton.setSelected(true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        durationString = ta.getDurationAsString();
 | 
					        durationField.setText(ta.getDurationAsString());
 | 
				
			||||||
        durationField.setText(durationString);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -143,7 +137,7 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
        TestAction ta = (TestAction) element;
 | 
					        TestAction ta = (TestAction) element;
 | 
				
			||||||
        ta.setAction(action);
 | 
					        ta.setAction(action);
 | 
				
			||||||
        ta.setTarget(target);
 | 
					        ta.setTarget(target);
 | 
				
			||||||
        ta.setDuration(durationString);
 | 
					        ta.setDuration(durationField.getText());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -154,7 +148,6 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
        super.clearGui();
 | 
					        super.clearGui();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        targetBox.setSelectedIndex(0);
 | 
					        targetBox.setSelectedIndex(0);
 | 
				
			||||||
        durationString = ""; //$NON-NLS-1$
 | 
					 | 
				
			||||||
        durationField.setText(""); //$NON-NLS-1$
 | 
					        durationField.setText(""); //$NON-NLS-1$
 | 
				
			||||||
        pauseButton.setSelected(true);
 | 
					        pauseButton.setSelected(true);
 | 
				
			||||||
        action = TestAction.PAUSE;
 | 
					        action = TestAction.PAUSE;
 | 
				
			||||||
| 
						 | 
					@ -253,17 +246,7 @@ public class TestActionGui extends AbstractSamplerGui {
 | 
				
			||||||
        // Duration
 | 
					        // Duration
 | 
				
			||||||
        HorizontalPanel durationPanel = new HorizontalPanel();
 | 
					        HorizontalPanel durationPanel = new HorizontalPanel();
 | 
				
			||||||
        durationField = new JTextField(15);
 | 
					        durationField = new JTextField(15);
 | 
				
			||||||
        durationField.setText("");
 | 
					        durationField.setText(""); // $NON-NLS-1$
 | 
				
			||||||
        durationField.addFocusListener(new FocusListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void focusLost(FocusEvent e) {
 | 
					 | 
				
			||||||
                durationString = durationField.getText();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void focusGained(FocusEvent e) {
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        durationPanel.add(new JLabel(durationLabel));
 | 
					        durationPanel.add(new JLabel(durationLabel));
 | 
				
			||||||
        durationPanel.add(durationField);
 | 
					        durationPanel.add(durationField);
 | 
				
			||||||
        add(durationPanel);
 | 
					        add(durationPanel);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,6 +113,7 @@ Webservice (SOAP) Request has been removed by default from GUI as Element is dep
 | 
				
			||||||
<h3>Other Samplers</h3>
 | 
					<h3>Other Samplers</h3>
 | 
				
			||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
<li><bugzilla>54913</bugzilla> - JMSPublisherGui incorrectly restore its state</li>
 | 
					<li><bugzilla>54913</bugzilla> - JMSPublisherGui incorrectly restore its state</li>
 | 
				
			||||||
 | 
					<li><bugzilla>55027</bugzilla> - Test Action regression, duration value are not record (nightly build)</li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h3>Controllers</h3>
 | 
					<h3>Controllers</h3>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue