On Mon, 15 Jun 2020 23:41:08 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Correcting the selection change events generated post sorting
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeTableViewTest.java
>  line 472:
> 
>> 471:             countSelectedIndexChangeEvent++;
>> 472:             assertEquals(selectedItemBefore, 
>> treeTableView.getTreeItem(sm.getSelectedIndex()));
>> 473:         });
> 
> If this assertion ever fails, I don't think it will cause a test failure, 
> since the event handling code will swallow
> the exception. The same is true of the other listeners. I don't know if it 
> would be possible to use the
> UncaughtExceptionHandler as is done in other tests -- see
> [JDK-8244531](https://bugs.openjdk.java.net/browse/JDK-8244531) -- but that 
> might be worth exploring. Another
> possibility is to wrap all the listeners in a try/catch and keep a list of 
> `Throwable`s that are caught.

Hi Kevin, I tested these listeners by adding assert that always fail. It shows 
the failures correctly. Also in this
file there are other tests which assert inside a listener. I confirmed that 
those tests also show failures correctly. I
could not find out what makes it work though.

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

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

Reply via email to