On Thu, 27 Jan 2022 11:42:28 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>>> Hm, is this really needed? 
>> 
>> yes, IMO, we want the exact same cleanup for passing/failing tests. So 
>> either dispose is required always (then need to make sure it's called on 
>> failure) or not required always (then all its calls would be noise).
>> 
>>> Not sure, are there any side effects by the `StageLoader` like this when a 
>>> test failed?  Just asking since the `StageLoader` is used a lot like this. 
>> 
>> don't now (and doesn't matter, what matters is the guaranteed cleanup) - and 
>> aware of those slightly fishy patterns, we all learn :) Faintly remember 
>> having discussed the point in a PR (can't find it right now, though), and 
>> just as faintly remember the outcome was to guarantee the cleanup in new 
>> tests.
>
> ah okay. Was just confusing for me since I never read that and I think some 
> recent PRs still had this pattern, e.g. also the touch table scrolling PR I 
> had a look at yesterday.
> 
> Maybe for future it makes sense to have an abstract test class with the stage 
> loader setup already in place.

just for reference - found the source of my [faintly 
remember](https://github.com/openjdk/jfx/pull/337/files/8a6fc1cf6cad2c453de17b71777ddd63fadb539e#r510975640)

-------------

PR: https://git.openjdk.java.net/jfx/pull/669

Reply via email to