Comments (9)
khammond25 (migrated from Bugzilla):
This also applies to the Gaussian Random and Uniform Random Timers.
from jmeter.
khammond25 (migrated from Bugzilla):
Created attachment patch.ConstantTimer.diff: Patch for ConstantTimer.java; file contains the diff
patch.ConstantTimer.diff
--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\timers\ConstantTimer.java Fri Aug 31 00:46:46 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\timers\ConstantTimer.java Tue Sep 18 14:04:42 2001
@@ -77,7 +77,8 @@
public class ConstantTimer implements Timer, JMeterComponentModel, Saveable,
Serializable
{
- private long delay = 300;
+ private final long DEFAULT_DELAY = 300;
+ private long delay = DEFAULT_DELAY;
private String name;
private static List addableList = new LinkedList();
@@ -135,6 +136,16 @@
public long getDelay()
{
return delay;
+ }
+
+ /************************************************************
+ * !ToDoo (Method description)
+ *
+ *@return !ToDo (Return description)
+ ***********************************************************/
+ public long getDefaultDelay()
+ {
+ return DEFAULT_DELAY;
}
/************************************************************
from jmeter.
khammond25 (migrated from Bugzilla):
Created attachment patch.ConstantTimerGui.diff: Patch for ConstantTimerGui.java; file contains the diff
patch.ConstantTimerGui.diff
--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\timers\gui\ConstantTimerGui.java Thu Jul 26 00:34:52 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\timers\gui\ConstantTimerGui.java Tue Sep 18 14:08:54 2001
@@ -124,7 +124,24 @@
}
else
{
- model.setDelay(Long.parseLong(delayField.getText()));
+ try
+ {
+ model.setDelay(Long.parseLong(delayField.getText()));
+ }
+ catch (NumberFormatException nfe)
+ {
+ if (delayField.getText().length() > 0)
+ {
+ JOptionPane.showMessageDialog(this, "You must enter a valid number",
+ "Invalid data", JOptionPane.WARNING_MESSAGE);
+ model.setDelay(model.getDefaultDelay());
+ delayField.setText("");
+ }
+ else
+ {
+ model.setDelay(model.getDefaultDelay());
+ }
+ }
}
}
@@ -135,4 +152,4 @@
public void keyTyped(KeyEvent e)
{
}
-}
\ No newline at end of file
+}
from jmeter.
khammond25 (migrated from Bugzilla):
Created attachment patch.GaussianRandomTimerGui.diff: Patch for GaussianRandomTimerGui.java; file contains the diff
patch.GaussianRandomTimerGui.diff
--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\timers\gui\GaussianRandomTimerGui.java Thu Jul 26 00:34:52 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\timers\gui\GaussianRandomTimerGui.java Tue Sep 18 14:13:18 2001
@@ -109,11 +109,45 @@
}
else if (temp.equals("Timer Delay"))
{
- model.setDelay(Long.parseLong(delayField.getText()));
+ try
+ {
+ model.setDelay(Long.parseLong(delayField.getText()));
+ }
+ catch (NumberFormatException nfe)
+ {
+ if (delayField.getText().length() > 0)
+ {
+ JOptionPane.showMessageDialog(this, "You must enter a valid number",
+ "Invalid data", JOptionPane.WARNING_MESSAGE);
+ model.setDelay(model.getDefaultDelay());
+ delayField.setText("");
+ }
+ else
+ {
+ model.setDelay(model.getDefaultDelay());
+ }
+ }
}
else if (temp.equals("Timer Delay Range"))
{
- model.setRange(Double.parseDouble(rangeField.getText()));
+ try
+ {
+ model.setRange(Double.parseDouble(rangeField.getText()));
+ }
+ catch (NumberFormatException nfe)
+ {
+ if (rangeField.getText().length() > 0)
+ {
+ JOptionPane.showMessageDialog(this, "You must enter a valid number",
+ "Invalid data", JOptionPane.WARNING_MESSAGE);
+ model.setRange(model.getDefaultRange());
+ rangeField.setText("");
+ }
+ else
+ {
+ model.setRange(model.getDefaultRange());
+ }
+ }
}
}
from jmeter.
khammond25 (migrated from Bugzilla):
Created attachment patch.RandomTimer.diff: Patch for RandomTimer.java; file contains the diff
patch.RandomTimer.diff
--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\timers\RandomTimer.java Fri Aug 31 00:46:46 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\timers\RandomTimer.java Tue Sep 18 14:16:18 2001
@@ -76,8 +76,10 @@
JMeterComponentModel, Saveable, Serializable
{
protected Random random;
- protected long delay = 300;
- protected double range = 100.0;
+ protected final long DEFAULT_DELAY = 300;
+ protected final double DEFAULT_RANGE = 100.0;
+ protected long delay = DEFAULT_DELAY;
+ protected double range = DEFAULT_RANGE;
private String name;
private static List addableList = new LinkedList();
@@ -142,6 +144,16 @@
*
*@return !ToDo (Return description)
***********************************************************/
+ public double getDefaultRange()
+ {
+ return DEFAULT_RANGE;
+ }
+
+ /************************************************************
+ * !ToDoo (Method description)
+ *
+ *@return !ToDo (Return description)
+ ***********************************************************/
public Class getTagHandlerClass()
{
return org.apache.jmeter.save.handlers.TimerHandler.class;
@@ -159,6 +171,15 @@
return delay;
}
+ /************************************************************
+ * !ToDoo (Method description)
+ *
+ *@return !ToDo (Return description)
+ ***********************************************************/
+ public long getDefaultDelay()
+ {
+ return DEFAULT_DELAY;
+ }
/************************************************************
* !ToDoo (Method description)
from jmeter.
khammond25 (migrated from Bugzilla):
The four patches fix all parts of this bug. Additionally, a dialog is
displayed if the user enters an invalid number. No more NumberFormatExceptions
in the console.
ConstantTimer and RandomTimer now have default constants, and GET methods that
the GUI can use to reset numeric fields to the default values if the user
enters an invalid number.
[See also: patches for https://github.com//issues/752 and https://github.com//issues/766]
from jmeter.
khammond25 (migrated from Bugzilla):
Fixed 2001.09.27.
from jmeter.
Jordi Salvat i Alabart (migrated from Bugzilla):
Marking all bugs RESOLVED before JMeter 1.8's release date as VERIFIED.
Yes, it's pretty poor QA procedure, but there's bugs here lingering since JMeter
1.6, and we need to clean up a little.
from jmeter.
Jordi Salvat i Alabart (migrated from Bugzilla):
Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.
from jmeter.
Related Issues (20)
- HeaderManager in a loop is cleared from header definitions if some specific samplers are executed before HOT 1
- Response Message is also not showing in the View Results Tree of Jmeter5.6.2 and 5.5 HOT 3
- Confusing instruction in jmeter.properties file
- Can't access Token with OpenID Connect authorization code flow
- JMeter Not Responding for Request with Response time 8 Min for Single User when reading data from Redis DB
- Use plugin "Selenium/WebDriver Support" and get error "setEndTime must be called after setStartTime"
- failureMessage is blank in csv generated by view result tree listener HOT 1
- Jmeter distributed testing: It took more than 100ms to start 1 slave, and for ten slaves it took more than 1 second, which is too slow to us HOT 2
- jmeter hangs when open a jmx with a Big JSON request param HOT 1
- I try to create the rpm for fedora, but the test fail during compilation
- Loop Controller causes "Existing CookieManager HTTP Cookie Manager superseded by HTTP Cookie Manager"
- Jmeter V5.6.3 HTML report -> Statistics under total showing half count of samples and fail count. Which is the right count of samples and failures?
- Excessive memory usage on Transaction Controller using parent sample HOT 1
- DNS Cache Manager doesn't check all DNS servers for a match and doesn't honor Clear Cache After Each Iteration setting HOT 2
- Use Google Magika for file type detection instead of Apache Tika HOT 2
- java.lang.NumberFormatException per each Jmeter's 'Regular Expression Extractor' when match not found
- CVE-2022-44729 Apache XML Graphics Batik v1.16 Server-Side Request Forgery vulnerability
- i just put "or tbl.FD_ORDER_NO = scd.client_order_no " in the end of statement, Jmter cannot run anymore HOT 2
- JMeter quits unexpectedly on MacOS (Apple Silicon)
- JMeter loses max width limit when going from window to maximized and back to window mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmeter.