jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1302119 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java xdocs/changes.xml
Date Sun, 18 Mar 2012 13:20:05 GMT
Author: pmouawad
Date: Sun Mar 18 13:20:04 2012
New Revision: 1302119

URL: http://svn.apache.org/viewvc?rev=1302119&view=rev
Log:
Bug 52937 - Webservice Sampler : Clear Soap Documents Cache at end of Test 

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java?rev=1302119&r1=1302118&r2=1302119&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
Sun Mar 18 13:20:04 2012
@@ -24,21 +24,15 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.StringReader;
 import java.io.StringWriter;
-import java.net.URL;
 import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.Map;
-import java.util.Random;
 import java.util.Map.Entry;
+import java.util.Random;
 
 import javax.xml.parsers.DocumentBuilder;
 
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
 import org.apache.commons.io.IOUtils;
-import org.apache.jorphan.io.TextFile;
-import org.apache.jorphan.logging.LoggingManager;
-
 import org.apache.jmeter.JMeter;
 import org.apache.jmeter.gui.JMeterFileFilter;
 import org.apache.jmeter.protocol.http.control.AuthManager;
@@ -46,14 +40,18 @@ import org.apache.jmeter.protocol.http.c
 import org.apache.jmeter.protocol.http.util.DOMPool;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.io.TextFile;
+import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
 import org.apache.soap.Envelope;
+import org.apache.soap.SOAPException;
 import org.apache.soap.messaging.Message;
 import org.apache.soap.rpc.SOAPContext;
 import org.apache.soap.transport.http.SOAPHTTPConnection;
 import org.apache.soap.util.xml.XMLParserUtils;
-import org.apache.soap.SOAPException;
 import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
 
 /**
  * Sampler to handle Web Service requests. It uses Apache SOAP drivers to
@@ -63,7 +61,8 @@ import org.w3c.dom.Document;
  * Created on: Jun 26, 2003
  *
  */
-public class WebServiceSampler extends HTTPSamplerBase {
+public class WebServiceSampler extends HTTPSamplerBase  {
+
     private static final Logger log = LoggingManager.getLoggerForClass();
 
     private static final long serialVersionUID = 240L;
@@ -651,4 +650,21 @@ public class WebServiceSampler extends H
     public void setTimeout(String text) {
         setProperty(TIMEOUT, text);
     }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase#testEnded()
+     */
+    @Override
+    public void testEnded() {
+        DOMPool.clear();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase#testEnded(java.lang.String)
+     */
+    @Override
+    public void testEnded(String host) {
+        testEnded();
+    }
+
 }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java?rev=1302119&r1=1302118&r2=1302119&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java Sun Mar
18 13:20:04 2012
@@ -72,4 +72,11 @@ public final class DOMPool {
      */
     private DOMPool() {
     }
+
+    /**
+     * Clear cache
+     */
+    public static void clear() {
+        MEMCACHE.clear();
+    }
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1302119&r1=1302118&r2=1302119&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Mar 18 13:20:04 2012
@@ -90,6 +90,7 @@ empty Name and Value are no more saved.
 <li>Bug 52869 - JSR223 language list currently uses BSF list which is wrong</li>
 <li>Bug 52932 - JDBC Sampler : Sampler is not marked in error in an Exception which
is not of class IOException, SQLException, IOException occurs</li>
 <li>Bug 52916 - JDBC Exception if there is an empty user defined variable</li>
+<li>Bug 52937 - Webservice Sampler : Clear Soap Documents Cache at end of Test </li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message