Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-3090

Normalize test cases where expect an exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.6
    • 1.4.7
    • None
    • None

    Description

      Many test cases uses the following logic to test if an exception has been thrown:

      try {
            <do something>
            fail("Expected exception");
          } catch (someException e) {
            // expected
          }
        }
      

      This form is not self-explanatory enough and could be replaced by a one line ExpectedException check which would be more clean.

      Attachments

        There are no Sub-Tasks for this issue.

        Activity

          People

            BoglarkaEgyed Boglarka Egyed
            BoglarkaEgyed Boglarka Egyed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: