You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2014/02/28 23:50:22 UTC

git commit: BIGTOP-1225. TestHDFSQuota can fail if tests are run out of order

Repository: bigtop
Updated Branches:
  refs/heads/master 2f27046f6 -> d2fbfbaa7


BIGTOP-1225. TestHDFSQuota can fail if tests are run out of order


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

Branch: refs/heads/master
Commit: d2fbfbaa72d5ba86f8ac1fef3bb83014c4d99b71
Parents: 2f27046
Author: Virginia Wang <vi...@wandisco.com>
Authored: Thu Feb 27 16:33:58 2014 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Thu Feb 27 16:33:58 2014 -0800

----------------------------------------------------------------------
 .../itest/hadoop/hdfs/TestHDFSQuota.groovy       | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/d2fbfbaa/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSQuota.groovy
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSQuota.groovy b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSQuota.groovy
index 68a3e6d..a2c0c57 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSQuota.groovy
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestHDFSQuota.groovy
@@ -17,11 +17,9 @@
  */
 package org.apache.bigtop.itest.hadoop.hdfs
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
+import org.junit.After
+import org.junit.Before
 import static org.junit.Assert.assertTrue;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.apache.bigtop.itest.shell.Shell;
 
@@ -37,8 +35,8 @@ public class TestHDFSQuota {
   private static String testQuotaFolder2 = testQuotaFolder + "2";
   private static String testQuotaFolder3 = testQuotaFolder + "3";
   
-  @BeforeClass
-  public static void setUp() {
+  @Before
+  public void setUp() {
     // creating test folders
     shHDFS.exec("hadoop fs -mkdir $testQuotaFolder1");
     assertTrue("Could not create input directory", shHDFS.getRet() == 0);
@@ -47,8 +45,8 @@ public class TestHDFSQuota {
     assertTrue("Could not create input directory", sh.getRet() == 0);
   }
 
-  @AfterClass
-  public static void tearDown() {
+  @After
+  public void tearDown() {
     // clean up of existing folders
     shHDFS.exec("hadoop fs -test -e $testQuotaFolder1");
     if (shHDFS.getRet() == 0) {
@@ -174,10 +172,7 @@ public class TestHDFSQuota {
     assertTrue("setQuota should have worked", shHDFS.getRet() == 0);
     shHDFS.exec("hadoop dfsadmin -setSpaceQuota 1 $testQuotaFolder1");
     assertTrue("setSpaceQuota should have worked", shHDFS.getRet() == 0);
-  }
-
-  @Test
-  public void testQuotas() {
+    //testQuotas
     // dir creation should fail - name quota
     shHDFS.exec("hadoop dfsadmin -setSpaceQuota 10000000000 $testQuotaFolder1");
     assertTrue("Could not setSpaceQuota", shHDFS.getRet() == 0);