Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3784

ImportExportTest doesn't detect lack of expected errors

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.5.1.1
    • Component/s: Test
    • Labels:
      None

      Description

      I observed that ImportExportTest contains many test cases which do try/catch/assertSQLException, but none of them call fail() at the end of the try block. Example:

      public void testEarlyEndOfFile() throws Exception {
      Connection c = getConnection();
      try

      { doImportFromFile(c, "extin/EndOfFile.txt" , "T4" , null , null , null, 0); }

      catch (SQLException e)

      { assertSQLState("XIE0E", e); }

      }

      I think this means that if the expected exception isn't thrown the test still passes.

        Attachments

        1. d3784.diff
          5 kB
          Knut Anders Hatlen

          Activity

            People

            • Assignee:
              knutanders Knut Anders Hatlen
              Reporter:
              knutanders Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: