You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/08/02 05:03:11 UTC

[11/13] git commit: Speed build time by making tearDowns static. Still need to refactor these.

Speed build time by making tearDowns static.  Still need to refactor these.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/4e289f0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/4e289f0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/4e289f0d

Branch: refs/heads/master
Commit: 4e289f0dec17eb1c4c3803a6f1cae0c250727754
Parents: bff8ab6
Author: Jacques Nadeau <ja...@apache.org>
Authored: Thu Aug 1 19:45:06 2013 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Thu Aug 1 19:45:06 2013 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/expr/ExpressionTest.java  | 10 ++++------
 .../exec/physical/impl/TestComparisonFunctions.java      |  9 ++++++---
 .../physical/impl/TestComparisonFunctionsNullable.java   | 11 +++++++----
 .../exec/physical/impl/filter/TestSimpleFilter.java      |  5 +++--
 .../exec/physical/impl/project/TestSimpleProjection.java |  5 +++--
 .../exec/physical/impl/svremover/TestSVRemover.java      |  5 +++--
 6 files changed, 26 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java
index 78f3731..ec17c63 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java
@@ -18,16 +18,14 @@ import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.expression.parser.ExprLexer;
 import org.apache.drill.common.expression.parser.ExprParser;
 import org.apache.drill.common.expression.parser.ExprParser.parse_return;
-import org.apache.drill.common.types.Types;
-import org.apache.drill.common.types.TypeProtos.DataMode;
-import org.apache.drill.common.types.TypeProtos.MajorType;
 import org.apache.drill.common.types.TypeProtos.MinorType;
+import org.apache.drill.common.types.Types;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.physical.impl.project.Projector;
 import org.apache.drill.exec.record.RecordBatch;
 import org.apache.drill.exec.record.RecordBatch.TypedFieldId;
 import org.apache.drill.exec.vector.IntVector;
-import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 public class ExpressionTest {
@@ -95,8 +93,8 @@ public class ExpressionTest {
     return cg.generate();
   }
 
-  @After
-  public void tearDown() throws Exception{
+  @AfterClass
+  public static void tearDown() throws Exception{
     // pause to get logger to catch up.
     Thread.sleep(1000);
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
index a52e1d6..4aa4dae 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
@@ -3,8 +3,10 @@ package org.apache.drill.exec.physical.impl;
 import com.google.common.base.Charsets;
 import com.google.common.io.Files;
 import com.yammer.metrics.MetricRegistry;
+
 import mockit.Injectable;
 import mockit.NonStrictExpectations;
+
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
@@ -18,6 +20,7 @@ import org.apache.drill.exec.proto.ExecProtos;
 import org.apache.drill.exec.rpc.user.UserServer;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -648,7 +651,7 @@ public class TestComparisonFunctions {
         assertTrue(!context.isFailed());
 
     }
-
+    
     @Test
     public void testFloat8LessThanEqual(@Injectable final DrillbitContext bitContext,
                                         @Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -676,8 +679,8 @@ public class TestComparisonFunctions {
 
     }
 
-    @After
-    public void tearDown() throws Exception{
+    @AfterClass
+    public static void tearDown() throws Exception{
         // pause to get logger to catch up.
         Thread.sleep(1000);
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
index 4a10d3f..362fc2b 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
@@ -3,8 +3,10 @@ package org.apache.drill.exec.physical.impl;
 import com.google.common.base.Charsets;
 import com.google.common.io.Files;
 import com.yammer.metrics.MetricRegistry;
+
 import mockit.Injectable;
 import mockit.NonStrictExpectations;
+
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
@@ -18,6 +20,7 @@ import org.apache.drill.exec.proto.ExecProtos;
 import org.apache.drill.exec.rpc.user.UserServer;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -343,9 +346,9 @@ public class TestComparisonFunctionsNullable {
         assertTrue(!context.isFailed());
     }
 
-    @After
-    public void tearDown() throws Exception{
-        // pause to get logger to catch up.
-        Thread.sleep(1000);
+    @AfterClass
+    public static void tearDown() throws Exception{
+      // pause to get logger to catch up.
+      Thread.sleep(1000);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
index a905a85..afb0b3a 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
@@ -19,6 +19,7 @@ import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
 import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import com.google.common.base.Charsets;
@@ -57,8 +58,8 @@ public class TestSimpleFilter {
 
   }
   
-  @After
-  public void tearDown() throws Exception{
+  @AfterClass
+  public static void tearDown() throws Exception{
     // pause to get logger to catch up.
     Thread.sleep(1000);
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
index 79218d1..3149c77 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
@@ -23,6 +23,7 @@ import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.apache.drill.exec.vector.BigIntVector;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import com.google.common.base.Charsets;
@@ -72,8 +73,8 @@ public class TestSimpleProjection {
     assertTrue(!context.isFailed());
   }
   
-  @After
-  public void tearDown() throws Exception{
+  @AfterClass
+  public static void tearDown() throws Exception{
     // pause to get logger to catch up.
     Thread.sleep(1000);
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/4e289f0d/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
index 2dafd0a..ed40c52 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
@@ -21,6 +21,7 @@ import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.apache.drill.exec.vector.ValueVector;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import com.google.common.base.Charsets;
@@ -63,8 +64,8 @@ public class TestSVRemover {
 
   }
   
-  @After
-  public void tearDown() throws Exception{
+  @AfterClass
+  public static void tearDown() throws Exception{
     // pause to get logger to catch up.
     Thread.sleep(1000);
   }