Author: pmouawad Date: Sat Oct 27 14:30:13 2018 New Revision: 1844975 URL: http://svn.apache.org/viewvc?rev=1844975&view=rev Log: Bug 62795 - JMeter master sometimes ends distributed test even though some of the slaves have not finished Bugzilla Id: 62795
Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java jmeter/trunk/xdocs/changes.xml Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1844975&r1=1844974&r2=1844975&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Sat Oct 27 14:30:13 2018 @@ -1204,7 +1204,7 @@ public class JMeter implements JMeterPlu * it calls ClientJMeterEngine.tidyRMI() to deal with the Naming Timer Thread. */ private static class ListenToTest implements TestStateListener, Runnable, Remoteable { - private final AtomicInteger started = new AtomicInteger(0); // keep track of remote tests + private AtomicInteger startedEngines; // keep track of remote tests private final List<JMeterEngine> engines; @@ -1216,6 +1216,7 @@ public class JMeter implements JMeterPlu */ public ListenToTest(List<JMeterEngine> engines, ReportGenerator reportGenerator) { this.engines=engines; + this.startedEngines = new AtomicInteger(engines == null ? 0 : engines.size()); this.reportGenerator = reportGenerator; } @@ -1224,7 +1225,7 @@ public class JMeter implements JMeterPlu public void testEnded(String host) { final long now=System.currentTimeMillis(); log.info("Finished remote host: {} ({})", host, now); - if (started.decrementAndGet() <= 0) { + if (startedEngines.decrementAndGet() <= 0) { Thread stopSoon = new Thread(this); // the calling thread is a daemon; this thread must not be // see Bug 59391 @@ -1249,7 +1250,6 @@ public class JMeter implements JMeterPlu @Override public void testStarted(String host) { - started.incrementAndGet(); final long now=System.currentTimeMillis(); log.info("Started remote host: {} ({})", host, now); } Modified: jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1844975&r1=1844974&r2=1844975&view=diff ============================================================================== --- jmeter/trunk/xdocs/changes.xml [utf-8] (original) +++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Oct 27 14:30:13 2018 @@ -183,6 +183,7 @@ Summary <li><bug>62743</bug>Client auth must be enabled on distributed testing</li> <li><bug>62767</bug>NPE when searching under certain conditions. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li> <li><bug>62790</bug>ArrayIndexOutOfBoundsException when calling replace without selecting the first match</li> + <li><bug>62795</bug>JMeter master sometimes ends distributed test even though some of the slaves have not finished</li> </ul> <!-- =================== Thanks =================== -->