Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18093

Better exception handling for testFileStatusOnMountLink() in ViewFsBaseTest.java

    XMLWordPrintableJSON

Details

    Description

      The following exception handling code section in testFileStatusOnMountLink() 

       

          try {
            fcView.getFileStatus(new Path("/danglingLink"));
            Assert.fail("Excepted a not found exception here");
          } catch ( FileNotFoundException e) {
            // as excepted
          }

      can be replaced with a single in the @Test 

      @Test(expected = FileNotFoundException.class)

      Attachments

        Activity

          People

            xinglin Xing Lin
            xinglin Xing Lin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 40m
                4h 40m