avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1383159 - /avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java
Date Mon, 10 Sep 2012 23:39:58 GMT
Author: cutting
Date: Mon Sep 10 23:39:58 2012
New Revision: 1383159

URL: http://svn.apache.org/viewvc?rev=1383159&view=rev
Log:
AVRO-1152. Java: Fix TestTraceSingletons for Java 7.

Modified:
    avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java

Modified: avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java?rev=1383159&r1=1383158&r2=1383159&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java
(original)
+++ avro/trunk/lang/java/ipc/src/test/java/org/apache/avro/ipc/trace/TestTraceSingletons.java
Mon Sep 10 23:39:58 2012
@@ -23,16 +23,21 @@ import static org.junit.Assert.assertEqu
 import java.io.IOException;
 
 import org.junit.Test;
+import org.junit.Before;
 
 public class TestTraceSingletons {
   
+  @Before
+  public void clearSingleton() throws Exception {
+    SingletonTestingTracePlugin.clearSingletonInfo();
+  }
+
   @Test
   public void testNormalConfiguration() throws IOException {
     TracePluginConfiguration conf = new TracePluginConfiguration();
     SingletonTestingTracePlugin.configureSingleton(conf);
     TracePlugin plugin = SingletonTestingTracePlugin.getSingleton();
     assertEquals(plugin.config, conf);
-    SingletonTestingTracePlugin.clearSingletonInfo();
   }
   
   /** Someone tries to re-configure after plugin dispatched. */
@@ -44,7 +49,6 @@ public class TestTraceSingletons {
     SingletonTestingTracePlugin.configureSingleton(conf1);
     TracePlugin plugin = SingletonTestingTracePlugin.getSingleton();
     SingletonTestingTracePlugin.configureSingleton(conf2);
-    SingletonTestingTracePlugin.clearSingletonInfo();
   }
   
   /** 
@@ -63,7 +67,6 @@ public class TestTraceSingletons {
     catch (RuntimeException e) {
       throw new AssertionError("Valid double configuration threw error.");
     }
-    SingletonTestingTracePlugin.clearSingletonInfo();
   }
   
   /**



Mime
View raw message