Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.21.0, 0.22.0
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None

      Description

      A helper class for FileContext tests should contain common methods which can be used in many unit tests, so that every unit test doesn't have to re-implement these functionality.
      Examples of such methods:
      createFile(FileContext fc, Path path, int numBlocks, int blockSize) //To create a file with number of blocks and block-size passed.
      getTestRootPath(FileContext fc)

      1. HADOOP-6394.5.patch
        57 kB
        Jitendra Nath Pandey
      2. HADOOP-6394.3.patch
        61 kB
        Jitendra Nath Pandey
      3. HADOOP-6394.2.patch
        61 kB
        Jitendra Nath Pandey
      4. HADOOP-6394.1.patch
        4 kB
        Jitendra Nath Pandey

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Patch Available Patch Available Open Open
          13d 17h 40m 2 Jitendra Nath Pandey 16/Dec/09 21:03
          Open Open Patch Available Patch Available
          7d 3h 46m 3 Jitendra Nath Pandey 16/Dec/09 21:03
          Patch Available Patch Available Resolved Resolved
          4h 28m 1 Suresh Srinivas 17/Dec/09 01:32
          Resolved Resolved Closed Closed
          250d 19h 8m 1 Tom White 24/Aug/10 21:40
          Tom White made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Tom White made changes -
          Fix Version/s 0.22.0 [ 12314296 ]
          Fix Version/s 0.21.0 [ 12313563 ]
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #94 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/94/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #94 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/94/ )
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #154 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/154/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #154 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/154/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #173 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/173/)
          HDFS-840. Change tests to use FileContext test helper introduced in . Contributed by Jitendra Nath Pandey.

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #173 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/173/ ) HDFS-840 . Change tests to use FileContext test helper introduced in . Contributed by Jitendra Nath Pandey.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #190 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/190/)
          . Add a helper class to simplify FileContext related tests and improve code reusability. Contributed by Jitendra Nath Pandey.

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #190 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/190/ ) . Add a helper class to simplify FileContext related tests and improve code reusability. Contributed by Jitendra Nath Pandey.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #149 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/149/)
          HDFS-840. Change tests to use FileContext test helper introduced in . Contributed by Jitendra Nath Pandey.

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #149 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/149/ ) HDFS-840 . Change tests to use FileContext test helper introduced in . Contributed by Jitendra Nath Pandey.
          Hide
          Konstantin Boudnik added a comment -

          HDFS build is failing after this modification:

          compile-hdfs-test:
              [javac] Compiling 143 source files to /home/cos/work/Hdfs/build/test/classes
              [javac] /home/cos/work/Hdfs/src/test/hdfs/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java:102: cannot find symbol
              [javac] symbol  : method getTestRootPath(java.lang.String)
              [javac] location: class org.apache.hadoop.fs.TestHDFSFileContextMainOperations
              [javac]     Path src1 = getTestRootPath("test/testOldRenameWithQuota/srcdir/src1");
              [javac]                 ^
              [javac] /home/cos/work/Hdfs/src/test/hdfs/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java:103: cannot find symbol
              [javac] symbol  : method getTestRootPath(java.lang.String)
              [javac] location: class org.apache.hadoop.fs.TestHDFSFileContextMainOperations
              [javac]     Path src2 = getTestRootPath("test/testOldRenameWithQuota/srcdir/src2");
          ...
          

          Hopefully it will be addressed by HDFS-840

          Show
          Konstantin Boudnik added a comment - HDFS build is failing after this modification: compile-hdfs-test: [javac] Compiling 143 source files to /home/cos/work/Hdfs/build/test/classes [javac] /home/cos/work/Hdfs/src/test/hdfs/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java:102: cannot find symbol [javac] symbol : method getTestRootPath(java.lang.String) [javac] location: class org.apache.hadoop.fs.TestHDFSFileContextMainOperations [javac] Path src1 = getTestRootPath("test/testOldRenameWithQuota/srcdir/src1"); [javac] ^ [javac] /home/cos/work/Hdfs/src/test/hdfs/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java:103: cannot find symbol [javac] symbol : method getTestRootPath(java.lang.String) [javac] location: class org.apache.hadoop.fs.TestHDFSFileContextMainOperations [javac] Path src2 = getTestRootPath("test/testOldRenameWithQuota/srcdir/src2"); ... Hopefully it will be addressed by HDFS-840
          Suresh Srinivas made changes -
          Link This issue is blocked by HDFS-840 [ HDFS-840 ]
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/120/)
          . Add a helper class to simplify FileContext related tests and improve code reusability. Contributed by Jitendra Nath Pandey.

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #120 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/120/ ) . Add a helper class to simplify FileContext related tests and improve code reusability. Contributed by Jitendra Nath Pandey.
          Suresh Srinivas made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Suresh Srinivas added a comment -

          Committed the patch. Thank you Jitendra.

          Show
          Suresh Srinivas added a comment - Committed the patch. Thank you Jitendra.
          Suresh Srinivas made changes -
          Fix Version/s 0.22.0 [ 12314296 ]
          Affects Version/s 0.21.0 [ 12313563 ]
          Affects Version/s 0.22.0 [ 12314296 ]
          Component/s test [ 12311440 ]
          Hide
          Jitendra Nath Pandey added a comment -

          The failure in TestUTF8 is unrelated to this patch.

          Show
          Jitendra Nath Pandey added a comment - The failure in TestUTF8 is unrelated to this patch.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12428221/HADOOP-6394.5.patch
          against trunk revision 891132.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 33 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12428221/HADOOP-6394.5.patch against trunk revision 891132. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 33 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/210/console This message is automatically generated.
          Jitendra Nath Pandey made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Jitendra Nath Pandey added a comment -

          HADOOP-6394.5.patch submitted for Hudson tests.

          Show
          Jitendra Nath Pandey added a comment - HADOOP-6394 .5.patch submitted for Hudson tests.
          Jitendra Nath Pandey made changes -
          Attachment HADOOP-6394.5.patch [ 12428221 ]
          Jitendra Nath Pandey made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hide
          Suresh Srinivas added a comment -

          Comments:

          1. There are some empty line changes, can you please remove them
          2. There are some lines longer than 80 columns
          3. FileContextCreateMkdirBaseTest.java - Use shortened path to Log4JLogger
          4. FileContextURIBase.java - Add a method setup as in other base tests with @Before annotation to fix the warning in class javadoc
          5. When using FileContextTestHelper, do a static import to avoid having to call methods using FileContextHelper class prefix.
          6. FileContextTestHelper - pass the block size also as CreateOpts to FileContext create method.
          7. FileContextTestHelper - make defaultBlockSize and defaultNumBlocks final
          8. FileContextTestHelper - make the class final and add a private constructor
          9. FileContextTestHelper.getTestRoot() - rootPath should be created always as different tests could use different FileContexts.
          10. FileContextMainOperationsBaseTest.testWriteInNonExistentDirectory - not sure why this throws InterruptedException. There are other methods throwing InterruptedException as well
          Show
          Suresh Srinivas added a comment - Comments: There are some empty line changes, can you please remove them There are some lines longer than 80 columns FileContextCreateMkdirBaseTest.java - Use shortened path to Log4JLogger FileContextURIBase.java - Add a method setup as in other base tests with @Before annotation to fix the warning in class javadoc When using FileContextTestHelper, do a static import to avoid having to call methods using FileContextHelper class prefix. FileContextTestHelper - pass the block size also as CreateOpts to FileContext create method. FileContextTestHelper - make defaultBlockSize and defaultNumBlocks final FileContextTestHelper - make the class final and add a private constructor FileContextTestHelper.getTestRoot() - rootPath should be created always as different tests could use different FileContexts. FileContextMainOperationsBaseTest.testWriteInNonExistentDirectory - not sure why this throws InterruptedException. There are other methods throwing InterruptedException as well
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12426800/HADOOP-6394.3.patch
          against trunk revision 886645.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 34 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12426800/HADOOP-6394.3.patch against trunk revision 886645. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 34 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/162/console This message is automatically generated.
          Jitendra Nath Pandey made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Jitendra Nath Pandey added a comment -

          HADOOP-6394.3.patch is submitted for Hudson tests

          Show
          Jitendra Nath Pandey added a comment - HADOOP-6394 .3.patch is submitted for Hudson tests
          Jitendra Nath Pandey made changes -
          Attachment HADOOP-6394.3.patch [ 12426800 ]
          Jitendra Nath Pandey made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12426744/HADOOP-6394.2.patch
          against trunk revision 886645.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 34 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12426744/HADOOP-6394.2.patch against trunk revision 886645. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 34 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/161/console This message is automatically generated.
          Jitendra Nath Pandey made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Jitendra Nath Pandey added a comment -

          Patch HADOOP-6394.2.patch is submitted for hudson tests.

          Show
          Jitendra Nath Pandey added a comment - Patch HADOOP-6394 .2.patch is submitted for hudson tests.
          Jitendra Nath Pandey made changes -
          Attachment HADOOP-6394.2.patch [ 12426744 ]
          Hide
          Suresh Srinivas added a comment -

          Preliminary comments:

          1. No need to have many variants of createFile. Just one with all the params should suffice. Callers should call create with appropriate args. Otherwise we will have too many createFile methods one for each usecase.
          2. Changes are required in tests to use this helper class to remove duplicated code.
          Show
          Suresh Srinivas added a comment - Preliminary comments: No need to have many variants of createFile. Just one with all the params should suffice. Callers should call create with appropriate args. Otherwise we will have too many createFile methods one for each usecase. Changes are required in tests to use this helper class to remove duplicated code.
          Jitendra Nath Pandey made changes -
          Description     A helper class for FileContext tests should contain common methods which can be used in many unit tests, so that every unit test doesn't have to re-implement these functionality.
          Examples of such methods:
            createFile(FileContext fc, Path path, int numBlocks, int blockSize) //To create a file with number of blocks and block-size passed.
            getTestRootPath(FileContext fc)
          Jitendra Nath Pandey made changes -
          Field Original Value New Value
          Attachment HADOOP-6394.1.patch [ 12426158 ]
          Jitendra Nath Pandey created issue -

            People

            • Assignee:
              Jitendra Nath Pandey
              Reporter:
              Jitendra Nath Pandey
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development