mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
09.51.2006 9f8ff8b66d182affc70991ed301e6b8f3ea86039
Update the matched values control test case to replace a couple of calls to
catch Exception with catch Throwable. This is necessary because when
assertions are enabled when running the unit tests, an AssertionError will be
generated by the methods in the Validator class rather than an exception, and
Throwable covers both exceptions and errors whereas Exception doesn't handle
errors.
1 files modified
8 ■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java 8 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
@@ -361,11 +361,11 @@
          }
        }
      }
      catch (Exception e)
      catch (Throwable t)
      {
        if ( ! exceptionExpected)
        {
          assertTrue(false, "Exception not excepted: " + e.getMessage());
          assertTrue(false, "Exception not excepted: " + t.getMessage());
        }
      }
    }
@@ -933,11 +933,11 @@
          assertEquals(attValueTestCurrent, mvf.getAssertionValue());
        }
      }
      catch (Exception e)
      catch (Throwable t)
      {
        if ( ! exceptionExpected)
        {
          assertTrue(false, "Exception not excepted" + e.getMessage());
          assertTrue(false, "Exception not excepted" + t.getMessage());
        }
      }
    }