You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by ol...@apache.org on 2014/02/20 01:32:40 UTC

svn commit: r1570013 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Author: olamy
Date: Thu Feb 20 00:32:39 2014
New Revision: 1570013

URL: http://svn.apache.org/r1570013
Log:
add assert on executionTime minimum as we have a thread.sleep

Modified:
    incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Modified: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java?rev=1570013&r1=1570012&r2=1570013&view=diff
==============================================================================
--- incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java (original)
+++ incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java Thu Feb 20 00:32:39 2014
@@ -87,6 +87,9 @@ public class PathTrackingInvocationListe
 
         Assert.assertEquals( 2, entry.getLevel() );
 
+        // there is Thread.sleep( 500 ) so we can be sure a minimum for that
+
+        Assert.assertTrue( entry.getExecutionTime() >= 500 * 1000000 );
 
         entry = entries.get( 2 );
 
@@ -96,6 +99,7 @@ public class PathTrackingInvocationListe
 
         Assert.assertEquals( 3, entry.getLevel() );
 
+        Assert.assertTrue( entry.getExecutionTime() >= 100 * 1000000 );
 
         entry = entries.get( 3 );
 
@@ -105,7 +109,7 @@ public class PathTrackingInvocationListe
 
         Assert.assertEquals( 4, entry.getLevel() );
 
-
+        Assert.assertTrue( entry.getExecutionTime() >= 300 * 1000000 );
 
     }
 



Re: svn commit: r1570013 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Me too but always something popping up when releasing ;)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-20 11:45 GMT+01:00 Olivier Lamy <ol...@apache.org>:
> On 20 February 2014 17:08, Romain Manni-Bucau <rm...@gmail.com> wrote:
>> Actually that's not true on windows, i dont have a good solution (:()
>
> I have a good solution: do not use windauze!!
> I start applying this few years ago and I'm very satisfied :-)
>
>> excepting being more tolerant or hacking tests with latches.
>> ---------- Message transféré ----------
>> De : <ol...@apache.org>
>> Date : 20 févr. 2014 01:33
>> Objet : svn commit: r1570013 -
>> /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>> À : <co...@sirona.incubator.apache.org>
>>
>> Author: olamy
>> Date: Thu Feb 20 00:32:39 2014
>> New Revision: 1570013
>>
>> URL: http://svn.apache.org/r1570013
>> Log:
>> add assert on executionTime minimum as we have a thread.sleep
>>
>> Modified:
>>
>> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>>
>> Modified:
>> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>> URL:
>> http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java?rev=1570013&r1=1570012&r2=1570013&view=diff
>> ==============================================================================
>> ---
>> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>> (original)
>> +++
>> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>> Thu Feb 20 00:32:39 2014
>> @@ -87,6 +87,9 @@ public class PathTrackingInvocationListe
>>
>>          Assert.assertEquals( 2, entry.getLevel() );
>>
>> +        // there is Thread.sleep( 500 ) so we can be sure a minimum for
>> that
>> +
>> +        Assert.assertTrue( entry.getExecutionTime() >= 500 * 1000000 );
>>
>>          entry = entries.get( 2 );
>>
>> @@ -96,6 +99,7 @@ public class PathTrackingInvocationListe
>>
>>          Assert.assertEquals( 3, entry.getLevel() );
>>
>> +        Assert.assertTrue( entry.getExecutionTime() >= 100 * 1000000 );
>>
>>          entry = entries.get( 3 );
>>
>> @@ -105,7 +109,7 @@ public class PathTrackingInvocationListe
>>
>>          Assert.assertEquals( 4, entry.getLevel() );
>>
>> -
>> +        Assert.assertTrue( entry.getExecutionTime() >= 300 * 1000000 );
>>
>>      }
>
>
>
> --
> Olivier Lamy
> Ecetera: http://ecetera.com.au
> http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: svn commit: r1570013 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Posted by Olivier Lamy <ol...@apache.org>.
On 20 February 2014 17:08, Romain Manni-Bucau <rm...@gmail.com> wrote:
> Actually that's not true on windows, i dont have a good solution (:()

I have a good solution: do not use windauze!!
I start applying this few years ago and I'm very satisfied :-)

> excepting being more tolerant or hacking tests with latches.
> ---------- Message transféré ----------
> De : <ol...@apache.org>
> Date : 20 févr. 2014 01:33
> Objet : svn commit: r1570013 -
> /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
> À : <co...@sirona.incubator.apache.org>
>
> Author: olamy
> Date: Thu Feb 20 00:32:39 2014
> New Revision: 1570013
>
> URL: http://svn.apache.org/r1570013
> Log:
> add assert on executionTime minimum as we have a thread.sleep
>
> Modified:
>
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
>
> Modified:
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
> URL:
> http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java?rev=1570013&r1=1570012&r2=1570013&view=diff
> ==============================================================================
> ---
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
> (original)
> +++
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
> Thu Feb 20 00:32:39 2014
> @@ -87,6 +87,9 @@ public class PathTrackingInvocationListe
>
>          Assert.assertEquals( 2, entry.getLevel() );
>
> +        // there is Thread.sleep( 500 ) so we can be sure a minimum for
> that
> +
> +        Assert.assertTrue( entry.getExecutionTime() >= 500 * 1000000 );
>
>          entry = entries.get( 2 );
>
> @@ -96,6 +99,7 @@ public class PathTrackingInvocationListe
>
>          Assert.assertEquals( 3, entry.getLevel() );
>
> +        Assert.assertTrue( entry.getExecutionTime() >= 100 * 1000000 );
>
>          entry = entries.get( 3 );
>
> @@ -105,7 +109,7 @@ public class PathTrackingInvocationListe
>
>          Assert.assertEquals( 4, entry.getLevel() );
>
> -
> +        Assert.assertTrue( entry.getExecutionTime() >= 300 * 1000000 );
>
>      }



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

Fwd: svn commit: r1570013 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Actually that's not true on windows, i dont have a good solution (:()
excepting being more tolerant or hacking tests with latches.
---------- Message transféré ----------
De : <ol...@apache.org>
Date : 20 févr. 2014 01:33
Objet : svn commit: r1570013 -
/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
À : <co...@sirona.incubator.apache.org>

Author: olamy
Date: Thu Feb 20 00:32:39 2014
New Revision: 1570013

URL: http://svn.apache.org/r1570013
Log:
add assert on executionTime minimum as we have a thread.sleep

Modified:

incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Modified:
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
URL:
http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java?rev=1570013&r1=1570012&r2=1570013&view=diff
==============================================================================
---
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
(original)
+++
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java
Thu Feb 20 00:32:39 2014
@@ -87,6 +87,9 @@ public class PathTrackingInvocationListe

         Assert.assertEquals( 2, entry.getLevel() );

+        // there is Thread.sleep( 500 ) so we can be sure a minimum for
that
+
+        Assert.assertTrue( entry.getExecutionTime() >= 500 * 1000000 );

         entry = entries.get( 2 );

@@ -96,6 +99,7 @@ public class PathTrackingInvocationListe

         Assert.assertEquals( 3, entry.getLevel() );

+        Assert.assertTrue( entry.getExecutionTime() >= 100 * 1000000 );

         entry = entries.get( 3 );

@@ -105,7 +109,7 @@ public class PathTrackingInvocationListe

         Assert.assertEquals( 4, entry.getLevel() );

-
+        Assert.assertTrue( entry.getExecutionTime() >= 300 * 1000000 );

     }