jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1815698 - in /jmeter/trunk: bin/testfiles/ src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/ src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/
Date Sat, 18 Nov 2017 21:39:34 GMT
Author: pmouawad
Date: Sat Nov 18 21:39:34 2017
New Revision: 1815698

URL: http://svn.apache.org/viewvc?rev=1815698&view=rev
Log:
Bug 61544 - JMS Point-to-Point Sampler: Enhance communication styles with read, browse, clear
This closes #325
Fix persistence and add tests
Bugzilla Id: 61544

Modified:
    jmeter/trunk/bin/testfiles/JMS_TESTS.csv
    jmeter/trunk/bin/testfiles/JMS_TESTS.jmx
    jmeter/trunk/bin/testfiles/JMS_TESTS.xml
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java

Modified: jmeter/trunk/bin/testfiles/JMS_TESTS.csv
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/JMS_TESTS.csv?rev=1815698&r1=1815697&r2=1815698&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/JMS_TESTS.csv (original)
+++ jmeter/trunk/bin/testfiles/JMS_TESTS.csv Sat Nov 18 21:39:34 2017
@@ -8,6 +8,12 @@ JMS-P2P-DifferentSelector,,No reply mess
 JMS-P2P-SameSelector,200,OK,TG-JMS-P2P 1-1,text,true,1,1,1,0
 JMS-P2P-RequestOnly,200,OK,TG-JMS-P2P 1-1,text,true,1,1,1,0
 JSS-ConsumePreviousMessage,200,OK,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-RequestOnly,200,OK,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-Browse,200,1 messages available on the queue,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-Read,200,1 message(s) received successfully,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-RequestOnlyForClear,200,OK,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-Clear,200,1 message(s) removed,TG-JMS-P2P 1-1,text,true,1,1,1,0
+JMS-P2P-BrowseAfterClear,200,0 messages available on the queue,TG-JMS-P2P 1-1,text,true,1,1,1,0
 JMS Publisher-NonDurable,200,1 messages published,TG-JMS-PS 2-1,,true,1,1,1,0
 JMS Subscriber-NonDurable,200,1 message(s) received successfully of 1 expected,TG-JMS-PS
2-1,text,true,1,1,1,0
 JMS Publisher-Persistent,200,1 messages published,TG-JMS-PS-Selector-receive 3-1,,true,1,1,1,0

Modified: jmeter/trunk/bin/testfiles/JMS_TESTS.jmx
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/JMS_TESTS.jmx?rev=1815698&r1=1815697&r2=1815698&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/JMS_TESTS.jmx (original)
+++ jmeter/trunk/bin/testfiles/JMS_TESTS.jmx Sat Nov 18 21:39:34 2017
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171027">
+<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171118">
   <hashTree>
     <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
       <stringProp name="TestPlan.comments"></stringProp>
@@ -29,7 +29,7 @@
           <stringProp name="scriptLanguage">groovy</stringProp>
           <stringProp name="parameters"></stringProp>
           <stringProp name="filename"></stringProp>
-          <stringProp name="cacheKey">12bd6db8-b5be-4825-a7ce-b7f4ba5ba84e</stringProp>
+          <stringProp name="cacheKey">true</stringProp>
           <stringProp name="script">import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.jmeter.util.JMeterUtils;
@@ -82,7 +82,6 @@ try {
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue0</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue">dynamicQueues/requestQueue0</stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">false</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">true</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -96,6 +95,7 @@ try {
             <collectionProp name="JMSProperties.properties"/>
           </elementProp>
           <boolProp name="JMSSampler.useResMsgIdAsCorrelId">true</boolProp>
+          <intProp name="JMSSampler.communicationStyle">1</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -109,7 +109,7 @@ try {
           <hashTree/>
         </hashTree>
         <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSS-ConsumeUpcomingMessage"
enabled="true">
-          <stringProp name="cacheKey">c7334ba5-f18d-407c-9a7f-28c29a6bee84</stringProp>
+          <stringProp name="cacheKey">true</stringProp>
           <stringProp name="filename"></stringProp>
           <stringProp name="parameters">dynamicQueues/requestQueue0-tmp</stringProp>
           <stringProp name="script">import org.apache.activemq.ActiveMQConnectionFactory;
@@ -190,7 +190,6 @@ class MyMessageListener implements Messa
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue0-tmp</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">false</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">true</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -205,6 +204,7 @@ class MyMessageListener implements Messa
           </elementProp>
           <boolProp name="JMSSampler.useResMsgIdAsCorrelId">true</boolProp>
           <stringProp name="TestPlan.comments">Test case where Request queue is empty
meaning we&apos;ll wait for a reply on ReplyTo queue</stringProp>
+          <intProp name="JMSSampler.communicationStyle">1</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -221,7 +221,6 @@ class MyMessageListener implements Messa
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue1</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue">dynamicQueues/requestQueue1</stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">false</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -240,6 +239,7 @@ class MyMessageListener implements Messa
               </elementProp>
             </collectionProp>
           </elementProp>
+          <intProp name="JMSSampler.communicationStyle">1</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -256,7 +256,6 @@ class MyMessageListener implements Messa
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue2</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue">dynamicQueues/requestQueue2</stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">false</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -281,6 +280,7 @@ class MyMessageListener implements Messa
             </collectionProp>
           </elementProp>
           <stringProp name="JMSSampler.jmsSelector">NewsType=&apos;Opinion&apos;</stringProp>
+          <intProp name="JMSSampler.communicationStyle">1</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -297,7 +297,6 @@ class MyMessageListener implements Messa
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue3</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue">dynamicQueues/requestQueue3</stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">false</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -322,6 +321,7 @@ class MyMessageListener implements Messa
             </collectionProp>
           </elementProp>
           <stringProp name="JMSSampler.jmsSelector">NewsType=&apos;Sports&apos;</stringProp>
+          <intProp name="JMSSampler.communicationStyle">1</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -338,7 +338,6 @@ class MyMessageListener implements Messa
           <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
           <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue4</stringProp>
           <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
-          <boolProp name="JMSSampler.isFireAndForget">true</boolProp>
           <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
           <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
           <stringProp name="JMSSampler.timeout"></stringProp>
@@ -357,6 +356,7 @@ class MyMessageListener implements Messa
               </elementProp>
             </collectionProp>
           </elementProp>
+          <intProp name="JMSSampler.communicationStyle">0</intProp>
         </JMSSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
@@ -382,7 +382,7 @@ class MyMessageListener implements Messa
           <hashTree/>
         </hashTree>
         <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSS-ConsumePreviousMessage"
enabled="true">
-          <stringProp name="cacheKey">c7334ba5-f18d-407c-9a7f-28c29a6bee84</stringProp>
+          <stringProp name="cacheKey">true</stringProp>
           <stringProp name="filename"></stringProp>
           <stringProp name="parameters"></stringProp>
           <stringProp name="script">import org.apache.activemq.ActiveMQConnectionFactory;
@@ -434,6 +434,241 @@ finally {
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-RequestOnly"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue5</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout"></stringProp>
+          <stringProp name="HTTPSamper.xml_data">Test-send-only-for-count-and-read</stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties">
+              <elementProp name="" elementType="JMSProperty">
+                <stringProp name="JMSProperty.name">JMSCorrelationId</stringProp>
+                <stringProp name="JMSProperty.value">MsgId-${__time(,)}</stringProp>
+                <stringProp name="JMSProperty.type">java.lang.String</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">0</intProp>
+          <intProp name="JMSSampler.communicationStyle">0</intProp>
+        </JMSSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1549895784">Oneway request has no response data</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+        <TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time"
enabled="true">
+          <intProp name="ActionProcessor.action">1</intProp>
+          <intProp name="ActionProcessor.target">0</intProp>
+          <stringProp name="ActionProcessor.duration">0</stringProp>
+        </TestAction>
+        <hashTree>
+          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer"
testname="Pause" enabled="true">
+            <stringProp name="ConstantTimer.delay">1000</stringProp>
+            <stringProp name="RandomTimer.range">100</stringProp>
+          </UniformRandomTimer>
+          <hashTree/>
+        </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-Browse"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue5</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout"></stringProp>
+          <stringProp name="HTTPSamper.xml_data"></stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties">
+              <elementProp name="" elementType="JMSProperty">
+                <stringProp name="JMSProperty.name">JMSCorrelationId</stringProp>
+                <stringProp name="JMSProperty.value">MsgId-${__time(,)}</stringProp>
+                <stringProp name="JMSProperty.type">java.lang.String</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">3</intProp>
+          <intProp name="JMSSampler.communicationStyle">3</intProp>
+        </JMSSampler>
+        <hashTree>
+          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer"
testname="Pause" enabled="true">
+            <stringProp name="ConstantTimer.delay">1000</stringProp>
+            <stringProp name="RandomTimer.range">100</stringProp>
+          </UniformRandomTimer>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1029016402">requestQueue5 has 1 messages</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-Read"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue5</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout">1000</stringProp>
+          <stringProp name="HTTPSamper.xml_data"></stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties"/>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">2</intProp>
+          <intProp name="JMSSampler.communicationStyle">2</intProp>
+        </JMSSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1086280699">Test-send-only-for-count-and-read</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-RequestOnlyForClear"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue6</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout"></stringProp>
+          <stringProp name="HTTPSamper.xml_data">Test-send-only-for-clear</stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties">
+              <elementProp name="" elementType="JMSProperty">
+                <stringProp name="JMSProperty.name">JMSCorrelationId</stringProp>
+                <stringProp name="JMSProperty.value">MsgId-${__time(,)}</stringProp>
+                <stringProp name="JMSProperty.type">java.lang.String</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">0</intProp>
+          <intProp name="JMSSampler.communicationStyle">0</intProp>
+        </JMSSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1549895784">Oneway request has no response data</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+        <TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time"
enabled="true">
+          <intProp name="ActionProcessor.action">1</intProp>
+          <intProp name="ActionProcessor.target">0</intProp>
+          <stringProp name="ActionProcessor.duration">0</stringProp>
+        </TestAction>
+        <hashTree>
+          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer"
testname="Pause" enabled="true">
+            <stringProp name="ConstantTimer.delay">1000</stringProp>
+            <stringProp name="RandomTimer.range">100</stringProp>
+          </UniformRandomTimer>
+          <hashTree/>
+        </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-Clear"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue6</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout">1</stringProp>
+          <stringProp name="HTTPSamper.xml_data"></stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties"/>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">4</intProp>
+          <stringProp name="JMSSampler.expiration">1000</stringProp>
+          <stringProp name="JMSSampler.jmsNumberOfSamplesToAggregate"></stringProp>
+          <intProp name="JMSSampler.communicationStyle">4</intProp>
+        </JMSSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="2008037952">requestQueue6: 1 message(s) removed</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
+        <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-BrowseAfterClear"
enabled="true">
+          <stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp>
+          <stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue6</stringProp>
+          <stringProp name="JMSSampler.ReceiveQueue"></stringProp>
+          <boolProp name="JMSSampler.isNonPersistent">false</boolProp>
+          <boolProp name="JMSSampler.useReqMsgIdAsCorrelId">false</boolProp>
+          <stringProp name="JMSSampler.timeout"></stringProp>
+          <stringProp name="HTTPSamper.xml_data">Test-send-only-for-count-and-read</stringProp>
+          <stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp>
+          <stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp>
+          <elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel"
testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <elementProp name="arguments" elementType="JMSProperties">
+            <collectionProp name="JMSProperties.properties">
+              <elementProp name="" elementType="JMSProperty">
+                <stringProp name="JMSProperty.name">JMSCorrelationId</stringProp>
+                <stringProp name="JMSProperty.value">MsgId-${__time(,)}</stringProp>
+                <stringProp name="JMSProperty.type">java.lang.String</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <intProp name="JMSSampler.communicationstyle">3</intProp>
+          <intProp name="JMSSampler.communicationStyle">3</intProp>
+        </JMSSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response
Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-1343037074">requestQueue6 has 0 messages</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">16</intProp>
+          </ResponseAssertion>
+          <hashTree/>
+        </hashTree>
       </hashTree>
       <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG-JMS-PS"
enabled="true">
         <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
@@ -1136,7 +1371,7 @@ propFloat	1.2</stringProp>
           <stringProp name="scriptLanguage">groovy</stringProp>
           <stringProp name="parameters"></stringProp>
           <stringProp name="filename"></stringProp>
-          <stringProp name="cacheKey">d47bf508-8239-4927-913f-238941a3e887</stringProp>
+          <stringProp name="cacheKey">true</stringProp>
           <stringProp name="script">import org.apache.activemq.broker.BrokerService;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.commons.io.FileUtils;
@@ -1180,6 +1415,7 @@ FileUtils.deleteDirectory(new File(JMete
           </value>
         </objProp>
         <stringProp name="filename">JMS_TESTS.csv</stringProp>
+        <stringProp name="TestPlan.comments">Clear messages on Send Queue requestQueue6:1
message(s) removed</stringProp>
       </ResultCollector>
       <hashTree/>
       <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple
Data Writer" enabled="true">
@@ -1216,9 +1452,5 @@ FileUtils.deleteDirectory(new File(JMete
       </ResultCollector>
       <hashTree/>
     </hashTree>
-    <WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="WorkBench" enabled="true">
-      <boolProp name="WorkBench.save">true</boolProp>
-    </WorkBench>
-    <hashTree/>
   </hashTree>
 </jmeterTestPlan>

Modified: jmeter/trunk/bin/testfiles/JMS_TESTS.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/JMS_TESTS.xml?rev=1815698&r1=1815697&r2=1815698&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/JMS_TESTS.xml (original)
+++ jmeter/trunk/bin/testfiles/JMS_TESTS.xml Sat Nov 18 21:39:34 2017
@@ -57,6 +57,48 @@
     <error>false</error>
   </assertionResult>
 </sample>
+<sample s="true" lb="JMS-P2P-RequestOnly" rc="200" rm="OK" tn="TG-JMS-P2P 1-1" dt="text"
sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JMS-P2P-Browse" rc="200" rm="1 messages available on the queue" tn="TG-JMS-P2P
1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JMS-P2P-Read" rc="200" rm="1 message(s) received successfully" tn="TG-JMS-P2P
1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JMS-P2P-RequestOnlyForClear" rc="200" rm="OK" tn="TG-JMS-P2P 1-1"
dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JMS-P2P-Clear" rc="200" rm="1 message(s) removed" tn="TG-JMS-P2P
1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JMS-P2P-BrowseAfterClear" rc="200" rm="0 messages available on the
queue" tn="TG-JMS-P2P 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
 <sample s="true" lb="JMS Publisher-NonDurable" rc="200" rm="1 messages published" tn="TG-JMS-PS
2-1" dt="" sc="1" ec="0" ng="1" na="1">
   <assertionResult>
     <name>Response Assertion</name>

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java?rev=1815698&r1=1815697&r2=1815698&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
Sat Nov 18 21:39:34 2017
@@ -44,7 +44,6 @@ import org.apache.jorphan.gui.JLabeledTe
 
 /**
  * Configuration screen for Java Messaging Point-to-Point requests. <br>
- * Created on: October 28, 2004
  *
  */
 public class JMSSamplerGui extends AbstractSamplerGui {
@@ -137,7 +136,7 @@ public class JMSSamplerGui extends Abstr
         element.setReceiveQueue(receiveQueue.getText());
 
         element.setProperty(JMSSampler.JMS_COMMUNICATION_STYLE, jmsCommunicationStyle.getSelectedIndex());
-
+        element.removeProperty(JMSSampler.IS_ONE_WAY);
         element.setNonPersistent(useNonPersistentDelivery.isSelected());
         element.setUseReqMsgIdAsCorrelId(useReqMsgIdAsCorrelId.isSelected());
         element.setUseResMsgIdAsCorrelId(useResMsgIdAsCorrelId.isSelected());

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=1815698&r1=1815697&r2=1815698&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 Sat
Nov 18 21:39:34 2017
@@ -216,18 +216,22 @@ public class JMSSampler extends Abstract
         LOGGER.debug("isBrowseOnly");
         StringBuilder sb = new StringBuilder("");
         res.setSuccessful(true);
-        sb.append("\n \n  Browse message on Send Queue " + sendQueue.getQueueName());
-        sb.append(browseQueueDetails(sendQueue, res));
+        sb.append("Browse message on Send Queue ").append(sendQueue.getQueueName())
+            .append(": ")
+            .append(browseQueueDetails(sendQueue, res));
         res.setResponseData(sb.toString().getBytes());
+        res.setResponseCodeOK();
     }
 
     private void handleClearQueue(SampleResult res) throws JMSException {
         LOGGER.debug("isClearQueue");
         StringBuilder sb = new StringBuilder("");
         res.setSuccessful(true);
-        sb.append("\n \n  Clear messages on Send Queue " + sendQueue.getQueueName());
-        sb.append(clearQueue(sendQueue, res));
+        sb.append("Clear messages on Send Queue ").append(sendQueue.getQueueName())
+                .append(": ")
+                .append(clearQueue(sendQueue, res));
         res.setResponseData(sb.toString().getBytes());
+        res.setResponseCodeOK();
     }
 
     private void handleOneWay(SampleResult res) throws JMSException {



Mime
View raw message