Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-5495

Remove further JUnit3 usages from HDFS

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:

      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.

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

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Jarek Jarcec Cecho
              Reporter:
              Andrew Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development