jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1630232 - /jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java
Date Thu, 09 Oct 2014 01:32:45 GMT
On 8 October 2014 22:01,  <pmouawad@apache.org> wrote:
> Author: pmouawad
> Date: Wed Oct  8 21:01:52 2014
> New Revision: 1630232
>
> URL: http://svn.apache.org/r1630232
> Log:
> Throw when configuration error (related to 57068)
>
> 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=1630232&r1=1630231&r2=1630232&view=diff
> ==============================================================================
> --- jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java (original)
> +++ jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java Wed Oct  8 21:01:52
2014
> @@ -159,8 +159,10 @@ public class SyncTimer extends AbstractT
>              try {
>                  if(timeoutInMs==0) {
>                      arrival = this.barrier.await();
> -                } else {
> +                } else if(timeoutInMs > 0){
>                      arrival = this.barrier.await(timeoutInMs, TimeUnit.MILLISECONDS);
> +                } else {
> +                    throw new IllegalArgumentException("Negative value for timeout:"+timeoutInMs+"
in Synchronizing Timer "+getName());

-1

This is the wrong place to check the value. It should be done in the
GUI and/or the setter method, not at run-time.

>                  }
>              } catch (InterruptedException e) {
>                  return 0;
>
>

Mime
View raw message