浏览代码

HUE-533. hue-plugin thriftfs test failure

bc Wong 14 年之前
父节点
当前提交
8bf7d71be3

+ 6 - 2
Makefile

@@ -271,10 +271,14 @@ ext-clean:
 ###############################################
 # Misc (some used by automated test scripts)
 ###############################################
-test:
+
+java-test:
+	mvn -f desktop/libs/hadoop/java/pom.xml test
+
+test: java-test
 	DESKTOP_DEBUG=1 $(BLD_DIR_BIN)/hue test fast --with-xunit
 
-test-slow:
+test-slow: java-test
 	DESKTOP_DEBUG=1 $(BLD_DIR_BIN)/hue test all --with-xunit --with-cover
 	$(BLD_DIR_BIN)/coverage xml
 

+ 3 - 1
desktop/libs/hadoop/java/src/test/java/org/apache/hadoop/thriftfs/ManualThreadPoolServerTest.java

@@ -32,6 +32,7 @@ import org.apache.thrift.TException;
 import org.apache.thrift.TProcessor;
 import org.apache.thrift.TProcessorFactory;
 import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
 
 /**
  * Manually test driver for futzing with the SanerThreadPoolServer-based
@@ -41,7 +42,8 @@ import org.apache.thrift.transport.TTransport;
  */
 public class ManualThreadPoolServerTest {
 
-  public static void main(String[] args) throws IOException {
+  public static void main(String[] args)
+        throws TTransportException, IOException {
     if (args.length != 3) {
       System.err.println("Arguments: minThreads maxThreads, queueSize");
       System.exit(1);

+ 0 - 6
desktop/libs/hadoop/java/src/test/java/org/apache/hadoop/thriftfs/TestNamenodePlugin.java

@@ -447,13 +447,7 @@ public class TestNamenodePlugin {
     assertEquals(UserGroupInformation.getCurrentUser().getUserName(),
                  fs.getFileStatus(byCurrentPath).getOwner());
 
-    // With a null context (eg clients that don't support this), should be
-    // the current user
     assertTrue(fs.delete(byCurrentPath, true));
-    namenode.mkdirhier(null, "/test-by-current", (short)0755);
-    assertEquals(UserGroupInformation.getCurrentUser().getUserName(),
-                 fs.getFileStatus(byCurrentPath).getOwner());
-
 
     // Dir made by unprivelegedCtx should be owned by the test user
     namenode.mkdirhier(unprivilegedCtx, "/test-by-other", (short)0755);