You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by mi...@apache.org on 2014/11/04 16:53:59 UTC

svn commit: r1636619 - in /jmeter/trunk: docs/images/screenshots/ docs/images/screenshots/jms/ src/core/org/apache/jmeter/resources/ src/protocol/jms/org/apache/jmeter/protocol/jms/ src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/ xdocs/ xdocs/...

Author: milamber
Date: Tue Nov  4 15:53:59 2014
New Revision: 1636619

URL: http://svn.apache.org/r1636619
Log:
JMSSampler: For input string: "" java.lang.NumberFormatException (for Expiration or Priority fields)
- fix the bug
- simply some code arround getPropertyAsString() vs Constant fields for Priority and Expiration
- add documentation for these fields in User Manual (JMS Publisher and JMS Point-to-Point)
- update screenshots
- add time unit in the GUI for expiration field and indicate the range 0-9 for priority level too.
Bugzilla Id: 57183

Modified:
    jmeter/trunk/docs/images/screenshots/jms/JMS_Point-to-Point.png
    jmeter/trunk/docs/images/screenshots/jmspublisher.png
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/images/screenshots/jms/JMS_Point-to-Point.png
    jmeter/trunk/xdocs/images/screenshots/jmspublisher.png
    jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jmeter/trunk/docs/images/screenshots/jms/JMS_Point-to-Point.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/jms/JMS_Point-to-Point.png?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
Binary files - no diff available.

Modified: jmeter/trunk/docs/images/screenshots/jmspublisher.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/jmspublisher.png?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
Binary files - no diff available.

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue Nov  4 15:53:59 2014
@@ -447,7 +447,7 @@ jms_dest_setup=Setup
 jms_dest_setup_dynamic=Each sample
 jms_dest_setup_static=At startup
 jms_durable_subscription_id=Durable Subscription ID
-jms_expiration=Expiration
+jms_expiration=Expiration (ms)
 jms_file=File
 jms_initial_context_factory=Initial Context Factory
 jms_itertions=Number of samples to aggregate
@@ -459,7 +459,7 @@ jms_message_type=Message Type
 jms_msg_content=Content
 jms_object_message=Object Message
 jms_point_to_point=JMS Point-to-Point
-jms_priority=Priority
+jms_priority=Priority (0-9)
 jms_properties=JMS Properties
 jms_properties_name=Name
 jms_properties_title=JMS Properties
@@ -488,7 +488,7 @@ jms_subscriber_title=JMS Subscriber
 jms_testing_title=Messaging Request
 jms_text_area=Text Message or Object Message serialized to XML by XStream
 jms_text_message=Text Message
-jms_timeout=Timeout (milliseconds)
+jms_timeout=Timeout (ms)
 jms_topic=Destination
 jms_use_auth=Use Authorization?
 jms_use_file=From file

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Tue Nov  4 15:53:59 2014
@@ -441,7 +441,7 @@ jms_dest_setup=Evaluer
 jms_dest_setup_dynamic=A chaque \u00E9chantillon
 jms_dest_setup_static=Au d\u00E9marrage
 jms_durable_subscription_id=ID d'abonnement durable
-jms_expiration=Expiration
+jms_expiration=Expiration (ms)
 jms_file=Fichier
 jms_initial_context_factory=Fabrique de connexion initiale
 jms_itertions=Nombre d'\u00E9chantillons \u00E0 agr\u00E9ger
@@ -453,7 +453,7 @@ jms_message_type=Type de message \: 
 jms_msg_content=Contenu
 jms_object_message=Message Object
 jms_point_to_point=Requ\u00EAte JMS Point-\u00E0-point
-jms_priority=Priorit\u00E9
+jms_priority=Priorit\u00E9 (0-9)
 jms_properties=Propri\u00E9t\u00E9s JMS
 jms_properties_name=Nom
 jms_properties_title=Propri\u00E9t\u00E9s JMS
@@ -482,7 +482,7 @@ jms_subscriber_title=Requ\u00EAte JMS Ab
 jms_testing_title=Messagerie Request
 jms_text_area=Message texte ou Message Objet s\u00E9rialis\u00E9 en XML par XStream
 jms_text_message=Message texte
-jms_timeout=D\u00E9lai (millisecondes)
+jms_timeout=D\u00E9lai (ms)
 jms_topic=Destination
 jms_use_auth=Utiliser l'authentification ?
 jms_use_file=Depuis un fichier

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java Tue Nov  4 15:53:59 2014
@@ -44,11 +44,11 @@ import org.apache.log.Logger;
 public final class Utils {
     // By default priority is 4
     // http://docs.oracle.com/javaee/6/tutorial/doc/bncfu.html
-    public static final int DEFAULT_PRIORITY_4 = 4;
+    public static final String DEFAULT_PRIORITY_4 = "4"; // $NON-NLS-1$
 
     // By default a message never expires
     // http://docs.oracle.com/javaee/6/tutorial/doc/bncfu.html
-    public static final long DEFAULT_NO_EXPIRY = 0L;
+    public static final String DEFAULT_NO_EXPIRY = "0"; // $NON-NLS-1$
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java Tue Nov  4 15:53:59 2014
@@ -469,11 +469,21 @@ public class JMSSampler extends Abstract
     }
     
     public String getExpiration() {
-        return getPropertyAsString(JMS_EXPIRATION, Long.toString(Utils.DEFAULT_NO_EXPIRY));
+        String expiration = getPropertyAsString(JMS_EXPIRATION);
+        if (expiration.length() == 0) {
+            return Utils.DEFAULT_NO_EXPIRY;
+        } else {
+            return expiration;
+        }
     }
 
     public String getPriority() {
-        return getPropertyAsString(JMS_PRIORITY, Integer.toString(Utils.DEFAULT_PRIORITY_4));
+        String priority = getPropertyAsString(JMS_PRIORITY);
+        if (priority.length() == 0) {
+            return Utils.DEFAULT_PRIORITY_4;
+        } else {
+            return priority;
+        }
     }
     
     /**
@@ -515,11 +525,11 @@ public class JMSSampler extends Abstract
     }
     
     public void setPriority(String s) {
-        setProperty(JMSSampler.JMS_PRIORITY, s, Integer.toString(Utils.DEFAULT_PRIORITY_4));
+        setProperty(JMSSampler.JMS_PRIORITY, s, Utils.DEFAULT_PRIORITY_4);
     }
     
     public void setExpiration(String s) {
-        setProperty(JMSSampler.JMS_EXPIRATION, s, Long.toString(Utils.DEFAULT_NO_EXPIRY));
+        setProperty(JMSSampler.JMS_EXPIRATION, s, Utils.DEFAULT_NO_EXPIRY);
     }
 
     /**

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java (original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java Tue Nov  4 15:53:59 2014
@@ -500,19 +500,19 @@ public class PublisherSampler extends Ba
     }
 
     public String getExpiration() {
-        return getPropertyAsString(JMS_EXPIRATION, Long.toString(Utils.DEFAULT_NO_EXPIRY));
+        return getPropertyAsString(JMS_EXPIRATION, Utils.DEFAULT_NO_EXPIRY);
     }
 
     public String getPriority() {
-        return getPropertyAsString(JMS_PRIORITY, Integer.toString(Utils.DEFAULT_PRIORITY_4));
+        return getPropertyAsString(JMS_PRIORITY, Utils.DEFAULT_PRIORITY_4);
     }
     
     public void setPriority(String s) {
-        setProperty(JMS_PRIORITY, s, Integer.toString(Utils.DEFAULT_PRIORITY_4));
+        setProperty(JMS_PRIORITY, s, Utils.DEFAULT_PRIORITY_4);
     }
     
     public void setExpiration(String s) {
-        setProperty(JMS_EXPIRATION, s, Long.toString(Utils.DEFAULT_NO_EXPIRY));
+        setProperty(JMS_EXPIRATION, s, Utils.DEFAULT_NO_EXPIRY);
     }
     
     /**

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Nov  4 15:53:59 2014
@@ -257,6 +257,7 @@ for details on configuring this componen
 <li><bugzilla>56761</bugzilla> - JMeter tries to stop already stopped JMS connection and displays "The connection is closed"</li>
 <li><bugzilla>57068</bugzilla> - No error thrown when negative duration is entered in Test Action</li>
 <li><bugzilla>57078</bugzilla> - LagartoBasedHTMLParser fails to parse page that contains input with no type</li>
+<li><bugzilla>57183</bugzilla> - JMSSampler: For input string: "" java.lang.NumberFormatException (for Expiration or Priority fields)</li>
 </ul>
 
 <h3>Controllers</h3>

Modified: jmeter/trunk/xdocs/images/screenshots/jms/JMS_Point-to-Point.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/jms/JMS_Point-to-Point.png?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
Binary files - no diff available.

Modified: jmeter/trunk/xdocs/images/screenshots/jmspublisher.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/jmspublisher.png?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
Binary files - no diff available.

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1636619&r1=1636618&r2=1636619&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Tue Nov  4 15:53:59 2014
@@ -1395,7 +1395,7 @@ e.g. props.get("START.HMS"); props.put("
 </properties>
 </component>
 
-<component name="JMS Publisher" index="&sect-num;.1.13" width="946" height="776" screenshot="jmspublisher.png">
+<component name="JMS Publisher" index="&sect-num;.1.13" width="854" height="796" screenshot="jmspublisher.png">
 <note>BETA CODE - the code is still subject to change</note>
     <description>
         <p>
@@ -1420,6 +1420,14 @@ e.g. props.get("START.HMS"); props.put("
   <property name="Authentication" required="Yes">Authentication requirement for the JMS provider</property>
   <property name="User" required="No">User Name</property>
   <property name="Password" required="No">Password (N.B. this is stored unencrypted in the test plan)</property>
+  <property name="Expiration" required="No">
+      The expiration time (in milliseconds) of the message before become obsolete.
+      If you do not specify an expiration time, the default value is 0 (never expires). 
+  </property>
+  <property name="Priority" required="No">
+      The level priority of the message. They have ten levels of priority from 0 (lowest) to 9 (highest). 
+      If you do not specify a priority level, the default level is 4. 
+  </property>
   <property name="Number of samples to aggregate" required="Yes">Number of samples to aggregate</property>
   <property name="Message source" required="Yes">Where to obtain the message:
   <ul>
@@ -1554,7 +1562,7 @@ completed, so the net effect was similar
 </p>
 </component>
 
-<component name="JMS Point-to-Point" index="&sect-num;.1.15"  width="924" height="797" screenshot="jms/JMS_Point-to-Point.png">
+<component name="JMS Point-to-Point" index="&sect-num;.1.15"  width="882" height="804" screenshot="jms/JMS_Point-to-Point.png">
 <note>BETA CODE - the code is still subject to change</note>
     <description>
         <p>
@@ -1632,6 +1640,15 @@ completed, so the net effect was similar
   <property name="Timeout" required="Yes">
       The timeout in milliseconds for the reply-messages. If a reply has not been received within the specified
       time, the specific testcase failes and the specific reply message received after the timeout is discarded.
+      Default value is 2000 ms.
+  </property>
+  <property name="Expiration" required="No">
+      The expiration time (in milliseconds) of the message before become obsolete.
+      If you do not specify an expiration time, the default value is 0 (never expires). 
+  </property>
+  <property name="Priority" required="No">
+      The level priority of the message. They have ten levels of priority from 0 (lowest) to 9 (highest). 
+      If you do not specify a priority level, the default level is 4. 
   </property>
   <property name="Use non-persistent delivery mode?" required="Yes">
       Whether to set DeliveryMode.NON_PERSISTENT.