jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1205986 - /jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java
Date Thu, 24 Nov 2011 21:35:22 GMT
Author: pmouawad
Date: Thu Nov 24 21:35:22 2011
New Revision: 1205986

URL: http://svn.apache.org/viewvc?rev=1205986&view=rev
Log:
Bug 51733 - SyncTimer is messed up if you a interrupt a test plan

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java?rev=1205986&r1=1205985&r2=1205986&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java Thu Nov 24 21:35:22
2011
@@ -20,8 +20,10 @@ package org.apache.jmeter.timers;
 
 import java.io.Serializable;
 
+import org.apache.jmeter.engine.event.LoopIterationEvent;
 import org.apache.jmeter.testbeans.TestBean;
 import org.apache.jmeter.testelement.AbstractTestElement;
+import org.apache.jmeter.testelement.TestListener;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
@@ -32,7 +34,7 @@ import org.apache.log.Logger;
  * thus create large instant loads at various points of the test plan.
  *
  */
-public class SyncTimer extends AbstractTestElement implements Timer, Serializable, TestBean
{
+public class SyncTimer extends AbstractTestElement implements Timer, Serializable, TestBean,
TestListener {
     private static final long serialVersionUID = 2;
 
     private static final Logger log = LoggingManager.getLoggerForClass();
@@ -105,4 +107,38 @@ public class SyncTimer extends AbstractT
         return newTimer;
     }
 
-}
+	/**
+	 * {@inheritDoc}
+	 */
+	public void testStarted() {
+		testStarted(null);
+	}
+
+	/**
+	 * Reset timerCounter
+	 */
+	public void testStarted(String host) {
+		this.timerCounter[0] = 0;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void testEnded() {
+		this.testEnded(null); 
+	}
+
+	/**
+	 * Reset timerCounter
+	 */
+	public void testEnded(String host) {
+		 this.timerCounter[0] = 0;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void testIterationStart(LoopIterationEvent event) {
+		// NOOP
+	}
+}
\ No newline at end of file



Mime
View raw message