svn commit: r907681 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java

[email protected] Mon, 08 Feb 2010 15:11:58 -0000
Newsgroups gmane.comp.jakarta.jmeter.devel
Message-ID <[email protected]>
Author: sebb
Date: Mon Feb  8 15:11:58 2010
New Revision: 907681

URL: http://svn.apache.org/viewvc?rev=907681&view=rev
Log:
Return a sample result, so can test methods that perform a sample

Modified:
    jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java?rev=907681&r1=907680&r2=907681&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java Mon Feb  8 15:11:58 2010
@@ -28,15 +28,19 @@
 
     private static final long serialVersionUID = 240L;
 
-    /*
-     * (non-Javadoc)
+    /**
+     * Returns a sample Result with the request fields filled in.
      * 
-     * @see org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase#sample(java.net.URL,
-     *      java.lang.String, boolean, int)
+     * {@inheritDoc}
      */
     @Override
-    protected HTTPSampleResult sample(URL u, String s, boolean b, int i) {
-        throw new UnsupportedOperationException("For test purposes only");
+    protected HTTPSampleResult sample(URL u, String method, boolean areFollowingRedirec, int depth) {
+        HTTPSampleResult res = new HTTPSampleResult();
+        res.sampleStart();
+        res.setURL(u);
+        res.sampleEnd();
+        return res;
+//        throw new UnsupportedOperationException("For test purposes only");
     }
 
 }