Derby
  1. Derby
  2. DERBY-5775

Upgrade tests should print full IOException stack trace when it fails to access old versions

    Details

    • Urgency:
      Low
    • Issue & fix info:
      Known fix, Newcomer

      Description

      When the Upgrade tests fail to access the oldVersions due to an IOException the message is not very clear as to what the IOException was. e,g. can output
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!
      ALARM: IOException msg: 'svn.apache.org'. Upgrade tests can NOT be run!

      Time: 0.008

      OK (0 tests)

      The code in OldVersions.getVersions()

      }
      } catch (IOException ioe)

      { alarm("Error reading from file: " + oldVersionsPath + ioe.getMessage()); }

      should print the exception stack trace or possibly even fail on IOException.

      1. DERBY-5775.diff
        0.9 kB
        Myrna van Lunteren

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          Just noting that my intention is to remove this code from the testing harness. That does not imply that the issue shouldn't be fixed on existing/relevant branches.
          It is wasteful to download the JARs from a server each time the upgrade test is run. No decision has been made on how the exact behavior will be.
          The work is tracked by DERBY-5475.

          Show
          Kristian Waagan added a comment - Just noting that my intention is to remove this code from the testing harness. That does not imply that the issue shouldn't be fixed on existing/relevant branches. It is wasteful to download the JARs from a server each time the upgrade test is run. No decision has been made on how the exact behavior will be. The work is tracked by DERBY-5475 .
          Hide
          Myrna van Lunteren added a comment -

          attaching a patch for possible fix for this.
          With this patch in place, if I take my machine off the network and run the tests, I get this for output:

          ALARM: IOException connecting to location: http://svn.apache.org/repos/asf/db/derby/jars/10.0.2.1, msg: 'svn.apache.org'. Upgrade tests can NOT be run!
          java.net.UnknownHostException: svn.apache.org
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:225)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
          at java.net.Socket.connect(Socket.java:539)
          at java.net.Socket.connect(Socket.java:488)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:408)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:543)
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:247)
          at sun.net.www.http.HttpClient.New(HttpClient.java:320)
          at sun.net.www.http.HttpClient.New(HttpClient.java:337)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:982)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:848)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1184)
          at java.net.URLConnection.getContent(URLConnection.java:712)
          at java.net.URL.getContent(URL.java:1036)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.createClassLoader(UpgradeClassLoader.java:223)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.access$000(UpgradeClassLoader.java:42)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader$3.run(UpgradeClassLoader.java:97)
          at java.security.AccessController.doPrivileged(AccessController.java:202)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.makeClassLoader(UpgradeClassLoader.java:93)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeRun.suite(UpgradeRun.java:75)
          at org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite.suite(_Suite.java:140)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
          at java.lang.reflect.Method.invoke(Method.java:611)
          at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
          at junit.textui.TestRunner.start(TestRunner.java:184)
          at junit.textui.TestRunner.main(TestRunner.java:143)

          If this is acceptable, we can commit it and backport it.

          Show
          Myrna van Lunteren added a comment - attaching a patch for possible fix for this. With this patch in place, if I take my machine off the network and run the tests, I get this for output: ALARM: IOException connecting to location: http://svn.apache.org/repos/asf/db/derby/jars/10.0.2.1 , msg: 'svn.apache.org'. Upgrade tests can NOT be run! java.net.UnknownHostException: svn.apache.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:225) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377) at java.net.Socket.connect(Socket.java:539) at java.net.Socket.connect(Socket.java:488) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:408) at sun.net.www.http.HttpClient.openServer(HttpClient.java:543) at sun.net.www.http.HttpClient.<init>(HttpClient.java:247) at sun.net.www.http.HttpClient.New(HttpClient.java:320) at sun.net.www.http.HttpClient.New(HttpClient.java:337) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:982) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:848) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1184) at java.net.URLConnection.getContent(URLConnection.java:712) at java.net.URL.getContent(URL.java:1036) at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.createClassLoader(UpgradeClassLoader.java:223) at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.access$000(UpgradeClassLoader.java:42) at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader$3.run(UpgradeClassLoader.java:97) at java.security.AccessController.doPrivileged(AccessController.java:202) at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeClassLoader.makeClassLoader(UpgradeClassLoader.java:93) at org.apache.derbyTesting.functionTests.tests.upgradeTests.UpgradeRun.suite(UpgradeRun.java:75) at org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite.suite(_Suite.java:140) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126) at junit.textui.TestRunner.start(TestRunner.java:184) at junit.textui.TestRunner.main(TestRunner.java:143) If this is acceptable, we can commit it and backport it.
          Hide
          Kathey Marsden added a comment -

          +1 to this patch. I think it will provide useful information when the upgrade tests don't run.

          Show
          Kathey Marsden added a comment - +1 to this patch. I think it will provide useful information when the upgrade tests don't run.
          Hide
          Myrna van Lunteren added a comment -

          I committed the patch with revision 1390126 (http://svn.apache.org/viewvc?view=revision&revision=1390126)
          I'll backport this to 10.9 and 10.8

          Show
          Myrna van Lunteren added a comment - I committed the patch with revision 1390126 ( http://svn.apache.org/viewvc?view=revision&revision=1390126 ) I'll backport this to 10.9 and 10.8
          Hide
          Myrna van Lunteren added a comment -

          backported to 10.9 and committed that with revision 1390135 (http://svn.apache.org/viewvc?view=revision&revision=1390135) and to 10.8 with revision 1390141 (http://svn.apache.org/viewvc?view=revision&revision=1390141).

          Show
          Myrna van Lunteren added a comment - backported to 10.9 and committed that with revision 1390135 ( http://svn.apache.org/viewvc?view=revision&revision=1390135 ) and to 10.8 with revision 1390141 ( http://svn.apache.org/viewvc?view=revision&revision=1390141 ).
          Hide
          Knut Anders Hatlen added a comment -

          [bulk update] Close all resolved issues that haven't been updated for more than one year.

          Show
          Knut Anders Hatlen added a comment - [bulk update] Close all resolved issues that haven't been updated for more than one year.

            People

            • Assignee:
              Myrna van Lunteren
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development