Created attachment 33598 [details] Add default value to mandatory fields As this 2 fields ( expiration & priority ) are mandatory, I modify their init value by default value.
Thanks for the patch. What is the rationale for choosing these particular default values? If there is not particular best choice it's not a good idea to provide defaults; the user should be forced to choose. Note: the documentation should ideally also be updated.
It's not my point of view, a default value is not absolutely the best value... but if you really want the user choose is own value, it's could be interresting to indicate which field are mandatory in the GUI (like a * or a comment), or may be indicate a better error when you forget to fill this properties. Because :impossible de cast "" as Integer is not rly user friendly.
(In reply to maxime.chassagneux from comment #2) > It's not my point of view, a default value is not absolutely the best > value... but if you really want the user choose is own value, it's could be > interresting to indicate which field are mandatory in the GUI (like a * or a > comment), That would be an other enhancement proposal. Patches are welcome although work is huge. or may be indicate a better error when you forget to fill this > properties. Because :impossible de cast "" as Integer is not rly user > friendly. In what case do you get this exception ? Could you provide jmeter.log file ? As per code: https://github.com/apache/jmeter/blob/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java#L519 https://github.com/apache/jmeter/blob/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java#L523 For me default values are set when there is an empty value. PS : When you submit a patch, either provide a Github PR or a fully fledged patch file that can be applied using : patch -p1 < patchfile.patch
Created attachment 33612 [details] Example
This is the problem, no stack trace, no error in the jmeter.log to help the user to find which field is missing. Just this : Nom d'unité : Send 1-1 Date début échantillon : 2016-02-29 10:17:09 CET Temps de réponse : 0 Temps établissement connexion : 0 Latence : 0 Taille en octets : 0 Taille de l'entête en octets : 0 Taille du corps en octets : 0 Compteur échantillon : 1 Compteur erreur: 1 Type de données ("text"|"bin"|""): Code de retour : 000 Message de retour : java.lang.NumberFormatException: For input string: ""
Hi, But it is strange as when the fields are empty, numerical default values are sent. Are you sure they are empty here ? Can you attach the test plan ? Are you sure the NumberFormatException concerns priority and expiration ? Thanks
Created attachment 33613 [details] Test plan
Yes I'm sure there are empty ( and it's the case for a new default sampler) And yes it's concern these fields, when I put values, it's OK.
Ok, I see the problem. I will submit a patch this day. Regards
Author: pmouawad Date: Mon Feb 29 12:16:39 2016 New Revision: 1732882 URL: http://svn.apache.org/viewvc?rev=1732882&view=rev Log: Bug 59075 - JMS Publisher: NumberFormatException is thrown is priority or expiration fields are empty Bugzilla Id: 59075 Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java jmeter/trunk/xdocs/changes.xml
Hi Maxime, Could you get in few minutes last nightly build (which is now ready to use as is since yesterday), it is currently being generated. If bug is fixed please leave a comment, if not reopen the bug. Thanks
I just merged the last git branch and this bug is now fix. Tanks again !!!!
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3858