Derby
  1. Derby
  2. DERBY-4997

SysinfoTest version output filtering is fragile with new java versions

    Details

    • Issue & fix info:
      Newcomer

      Description

      Some newer java version output may have lines lines that are not filtered out by the existing SysinfoTest.
      Myrna suggests checking for and filtering out the exact properties we expect to see to make a better test and make it less fragile.

      1. derby-4997_diff.txt
        8 kB
        Kathey Marsden
      2. derby-4997_notforcommit.txt
        0.8 kB
        Kathey Marsden

        Activity

        Kathey Marsden created issue -
        Hide
        Kathey Marsden added a comment -

        This was my first shot at fixing this issue for an IBM jvm, but I want to make it more generic as Myrna suggested. Attaching mostly to try out attach in New Jira.

        Show
        Kathey Marsden added a comment - This was my first shot at fixing this issue for an IBM jvm, but I want to make it more generic as Myrna suggested. Attaching mostly to try out attach in New Jira.
        Kathey Marsden made changes -
        Field Original Value New Value
        Attachment derby-4997_notforcommit.txt [ 12470062 ]
        Hide
        Kathey Marsden added a comment -

        I have been looking at this test derbynet.SysinfoTest and it seems to me its focus is to make sure the network server properties derby.drda.* print.
        It does this by replacing everything else with empty strings in the sed() method. I am thinking that we should just have the test check for the things it is looking for and not fail for additional lines as it often does as new things are added or if jvm's have multiline version output.

        One thing to note is that while the output checks for this test focus on network server, this is the only test that we actually have for Sysinfo,
        So it might be nice to expand it at some point to check the other things that sysinfo outputs. As another aside I am seeing permission errors in the sysinfo output for java.home, user.name and user.home. I thought this was addressed at one point, but will file an issue if needed.

        Show
        Kathey Marsden added a comment - I have been looking at this test derbynet.SysinfoTest and it seems to me its focus is to make sure the network server properties derby.drda.* print. It does this by replacing everything else with empty strings in the sed() method. I am thinking that we should just have the test check for the things it is looking for and not fail for additional lines as it often does as new things are added or if jvm's have multiline version output. One thing to note is that while the output checks for this test focus on network server, this is the only test that we actually have for Sysinfo, So it might be nice to expand it at some point to check the other things that sysinfo outputs. As another aside I am seeing permission errors in the sysinfo output for java.home, user.name and user.home. I thought this was addressed at one point, but will file an issue if needed.
        Hide
        Kathey Marsden added a comment -

        Here is the patch I would like to commit for this issue. The sed method has been removed and now the tests just checks for the strings that it needs to check in the output without failing if the number of lines change.

        Show
        Kathey Marsden added a comment - Here is the patch I would like to commit for this issue. The sed method has been removed and now the tests just checks for the strings that it needs to check in the output without failing if the number of lines change.
        Kathey Marsden made changes -
        Attachment derby-4997_diff.txt [ 12470260 ]
        Kathey Marsden made changes -
        Issue & fix info [Newcomer] [Newcomer, Patch Available]
        Kathey Marsden made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Issue & fix info [Patch Available, Newcomer] [Newcomer]
        Fix Version/s 10.5.3.2 [ 12315436 ]
        Fix Version/s 10.6.2.3 [ 12315434 ]
        Fix Version/s 10.7.1.3 [ 12315902 ]
        Fix Version/s 10.8.0.0 [ 12315561 ]
        Resolution Fixed [ 1 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Fix Version/s 10.8.1.0 [ 12315561 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.2 [ 12316362 ]
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Gavin made changes -
        Workflow jira [ 12544395 ] Default workflow, editable Closed status [ 12801006 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        2d 4h 36m 1 Kathey Marsden 04/Feb/11 23:05

          People

          • Assignee:
            Unassigned
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development