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

ImportExportTest doesn't detect lack of expected errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.5.1.1
    • 10.5.1.1
    • Test
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: