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

neil_a_wilson
09.51.2006 32fc01cbb578afb62cb4b678f4066976e8ee6337
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
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/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());
        }
      }
    }