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

JDBCMBeanTest#testAttributeDriverLevel uses Java assert in lieu of JUnit assert: no real testing happens

    Details

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

      Description

      Cf these lines:

      assert(driverLevelString.indexOf('?') == -1);
      assert(driverLevelString.matches("^JRE - JDBC: " + JDBCVersion + ".*"));

      The "assert" is a Java built-in rather than the JUnit assertTrue we need.

      The string driverLevelString is also wrong, since it is a mere toString of the bean name. We need to use getAttribute on it to get the driver level
      for asserting.

        Attachments

        1. derby-5521-followup.diff
          1 kB
          Dag H. Wanvik
        2. derby-5521b.diff
          2 kB
          Dag H. Wanvik
        3. derby-5521.diff
          1 kB
          Dag H. Wanvik

          Issue Links

            Activity

              People

              • Assignee:
                dagw Dag H. Wanvik
                Reporter:
                dagw Dag H. Wanvik
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: