Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-5495

Remove further JUnit3 usages from HDFS

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0, 3.0.0-alpha1
    • 2.3.0
    • None

    Description

      We're trying to move away from junit3 in hadoop to junit4. One easy way of testing for this is something like the following:

      -> % ack junit.framework -l
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestAbandonBlock.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestConnCache.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientExcludedNodes.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSOutputStream.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileInputStreamCache.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReport.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestMultipleNNDataBlockScanner.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/TestAvailableSpaceVolumeChoosingPolicy.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestPathBasedCacheRequests.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestXMLUtils.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestURLConnectionFactory.java
      hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java
      hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSKerberosAuthenticationHandler.java
      hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSWithKerberos.java
      hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/service/security/TestDelegationTokenManagerService.java
      hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestWrites.java
      

      Most of these are probably just static assert imports, it's fairly mechanical to use the JUnit4 versions. Same goes for converting the unit tests (if necessary).

      See HDFS-3583 and HDFS-3711 for the history.

      Attachments

        1. HDFS-5495-trunk.patch
          19 kB
          Jarek Jarcec Cecho

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jarcec Jarek Jarcec Cecho
            andrew.wang Andrew Wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment