GeoTools
  1. GeoTools
  2. GEOT-2320

OnlineTestCase support for failure on failed connection

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6-M2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      OnlineTestCase disables an online test if connect() fails. This may not be the desired behaviour. The attached patch (for trunk) adds an optional key to the test fixture property file that allows this behaviour to be changed.

      From the javadoc:

      The default behaviour of this class is that if connect() throws an exception, the test
      suite is disabled, causing each test to pass without being run. In addition, exceptions thrown by
      disconnect() are ignored. This behaviour allows tests to be robust against transient
      outages of online resources, but also means that local software failures in connect() or
      disconnect() will be silent.

      To have exceptions thrown by connect() and disconnect() cause tests to fail,
      set skip.on.failure=false in the fixture property file. This restores the
      traditional behaviour of unit tests, that is, that exceptions cause unit tests to fail.

        Issue Links

          Activity

          Hide
          Ben Caradoc-Davies added a comment -
          The patch also changes exception swallowing behaviour to swallow Exception not Throwable.
          Show
          Ben Caradoc-Davies added a comment - The patch also changes exception swallowing behaviour to swallow Exception not Throwable.
          Show
          Ben Caradoc-Davies added a comment - Proposal for this change: http://docs.codehaus.org/display/GEOTOOLS/OnlineTestCase+support+for+failure+on+failed+connection
          Hide
          Ben Caradoc-Davies added a comment -
          Change committed to subversion.
          Show
          Ben Caradoc-Davies added a comment - Change committed to subversion.
          Hide
          Andrea Aime added a comment -
          Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
          Show
          Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

            People

            • Assignee:
              Ben Caradoc-Davies
              Reporter:
              Ben Caradoc-Davies
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: