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

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

    XMLWordPrintableJSON

Details

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

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

              Dates

                Created:
                Updated:
                Resolved: