> This PR removes unrelated `stderr` output in the headless test logs by > redirecting it to an in-memory buffer. Exceptions found in the buffer can be > checked against the expected list. > > In the case when any mismatch is detected, whether the type or the number of > exceptions of particular type, the accumulated buffer gets dumped to `stderr` > and the test fails. > > ## How To > > To redirect stderr and later check the exceptions, surround your code with > > `OutputRedirect.suppressStderr()` and either `OutputRedirect.checkStderr()` > or `OutputRedirect.checkAndRestoreStderr()` (ideally, in the `finally` block). > > To simply undo redirection, without checking, call > `OutputRedirect.restoreStderr()`. > > To add the check to all the tests in the file, one can call the above > mentioned methods inside `@BeforeEach` and `@AfterEach`. > > ## Changes > > - added `OutputRedirect` facility > - fixed ErrorLoggingUtiltity name
Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision: cleanup ------------- Changes: - all: https://git.openjdk.org/jfx/pull/1897/files - new: https://git.openjdk.org/jfx/pull/1897/files/4954914f..447b96de Webrevs: - full: https://webrevs.openjdk.org/?repo=jfx&pr=1897&range=06 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1897&range=05-06 Stats: 27 lines in 9 files changed: 9 ins; 0 del; 18 mod Patch: https://git.openjdk.org/jfx/pull/1897.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1897/head:pull/1897 PR: https://git.openjdk.org/jfx/pull/1897