PHOENIX-1941 Phoenix tests are failing in linux env with missing class: 
StaticMapping (Alicia Ying Shu)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/329d7494
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/329d7494
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/329d7494

Branch: refs/heads/4.x-HBase-1.1
Commit: 329d74948521ed974593e455369a27d9cd705249
Parents: 52f5b04
Author: Nick Dimiduk <ndimi...@apache.org>
Authored: Wed Jun 17 12:17:33 2015 -0700
Committer: Nick Dimiduk <ndimi...@apache.org>
Committed: Wed Jun 17 12:23:47 2015 -0700

----------------------------------------------------------------------
 .../phoenix/end2end/End2EndTestDriver.java       | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/329d7494/phoenix-core/src/it/java/org/apache/phoenix/end2end/End2EndTestDriver.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/End2EndTestDriver.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/End2EndTestDriver.java
index 26d18cf..743f729 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/End2EndTestDriver.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/End2EndTestDriver.java
@@ -21,6 +21,7 @@ package org.apache.phoenix.end2end;
 
 import java.io.IOException;
 import java.io.PrintStream;
+import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -79,10 +80,20 @@ public class End2EndTestDriver extends AbstractHBaseTool {
 
       @Override
       public boolean isCandidateClass(Class<?> c) {
-        return testFilterRe.matcher(c.getName()).find() &&
-          // Our pattern will match the below NON-IntegrationTest. Rather than
-          // do exotic regex, just filter it out here
-          super.isCandidateClass(c);
+          Annotation[] annotations = c.getAnnotations();
+          for (Annotation curAnnotation : annotations) {
+              if 
(curAnnotation.toString().contains("NeedsOwnMiniClusterTest")) {
+                  /* Skip tests that aren't designed to run against a live 
cluster.
+                   * For a live cluster, we cannot bring it up and down as 
required
+                   * for these tests to run.
+                   */
+                  return false;
+              }
+          }
+          return testFilterRe.matcher(c.getName()).find() &&
+                  // Our pattern will match the below NON-IntegrationTest. 
Rather than
+                  // do exotic regex, just filter it out here
+                  super.isCandidateClass(c);
       }
     }
 

Reply via email to