Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5560

Clean up bad exception catching practices in TestYarnClient

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • Reviewed

    Description

      In TestYarnClient, tests commonly wrap methods that throw exceptions in a try catch statement similar to the following:

      try {
          client.submitApplication(context);
      } catch (Exception e) {
          Assert.fail("Exception is not expected.");
      }
      

      This hides useful error messages, and surfaces less helpful ones.

      Attachments

        1. YARN-5560.v1.patch
          13 kB
          Sean Po
        2. YARN-5560.v2.patch
          13 kB
          Sean Po
        3. YARN-5560.v3.patch
          14 kB
          Sean Po

        Activity

          People

            seanpo03 Sean Po
            seanpo03 Sean Po
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: