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:21 UTC

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

Author: olamy
Date: Thu Feb 20 00:32:21 2014
New Revision: 1570011

URL: http://svn.apache.org/r1570011
Log:
extract test class

Added:
    incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java   (with props)
Modified:
    incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/PathTrackingInvocationListenerTest.java

Added: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java?rev=1570011&view=auto
==============================================================================
--- incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java (added)
+++ incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java Thu Feb 20 00:32:21 2014
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.test.sirona.javaagent;
+
+
+public class App
+{
+
+    public void foo()
+        throws Exception
+    {
+        Thread.sleep( 500 );
+    }
+
+    public void beer()
+        throws Exception
+    {
+        this.foo();
+        this.pub();
+    }
+
+    public void pub()
+        throws Exception
+    {
+        Thread.sleep( 100 );
+        this.bar();
+    }
+
+    public void bar()
+        throws Exception
+    {
+        Thread.sleep( 300 );
+    }
+
+}

Propchange: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/test/sirona/javaagent/App.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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=1570011&r1=1570010&r2=1570011&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:21 2014
@@ -57,53 +57,24 @@ public class PathTrackingInvocationListe
 
         Assert.assertTrue( !all.isEmpty() );
 
-        // so we have 4 entries constructor is ignored!
-
-
-
-
-
         // test only one Thread so only one trackingId
         Assert.assertEquals( 1, all.size() );
 
         List<PathTrackingEntry> entries = new ArrayList<PathTrackingEntry>( all.values().iterator().next() );
 
+        // so we have 4 entries constructor is ignored!
+
         Assert.assertEquals( 4, entries.size() );
 
         for ( PathTrackingEntry entry : entries )
         {
             System.out.println( "entry:" + entry );
         }
-    }
 
 
-    public static class App
-    {
-        public void foo()
-            throws Exception
-        {
-            Thread.sleep( 500 );
-        }
+        PathTrackingEntry first  = entries.get( 0 );
 
-        public void beer()
-            throws Exception
-        {
-            this.foo();
-            this.pub();
-        }
-
-        public void pub()
-            throws Exception
-        {
-            Thread.sleep( 100 );
-            this.bar();
-        }
-
-        public void bar()
-            throws Exception
-        {
-            Thread.sleep( 300 );
-        }
+        Assert.assertEquals( "beer", first.getMethodName() );
     }
 
 }