Author: sebb
Date: Wed Oct 5 00:23:29 2011
New Revision: 1179017
URL: http://svn.apache.org/viewvc?rev=1179017&view=rev
Log:
Bug 51957 - Concurrent get can hang if a task does not complete
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
jakarta/jmeter/trunk/xdocs/changes.xml
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1179017&r1=1179016&r2=1179017&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Wed Oct 5 00:23:29 2011
@@ -40,6 +40,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import org.apache.commons.io.IOUtils;
import org.apache.jmeter.config.Argument;
@@ -1213,9 +1214,14 @@ public abstract class HTTPSamplerBase ex
// add result to main sampleResult
for (Future<HTTPSampleResult> future : retExec) {
- final HTTPSampleResult binRes = future.get();
- res.addSubResult(binRes);
- res.setSuccessful(res.isSuccessful() &&
binRes.isSuccessful());
+ HTTPSampleResult binRes;
+ try {
+ binRes = future.get(1, TimeUnit.MILLISECONDS);
+ res.addSubResult(binRes);
+ res.setSuccessful(res.isSuccessful() &&
binRes.isSuccessful());
+ } catch (TimeoutException e) {
+ errorResult(e, res);
+ }
}
} catch (InterruptedException ie) {
log.warn("Interruped fetching embedded resources", ie); //
$NON-NLS-1$
Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=1179017&r1=1179016&r2=1179017&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Oct 5 00:23:29 2011
@@ -84,6 +84,7 @@ This has been corrected; can still rever
<li>Bug 51918 - GZIP compressed traffic produces errors, when multiple
connections allowed</li>
<li>Bug 51939 - Should generate new parent sample if necessary when retrieving
embedded resources</li>
<li>Bug 51942 - Synchronisation issue on CacheManager when Concurrent Download
is used</li>
+<li>Bug 51957 - Concurrent get can hang if a task does not complete</li>
</ul>
<h3>Other Samplers</h3>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]