< prev index next >
modules/controls/src/test/java/javafx/scene/control/TreeTableViewTest.java
Print this page
rev 8906 : RT-46083: TimelineClipCore exceptions handling improvent
*** 81,90 ****
--- 81,91 ----
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import com.sun.javafx.scene.control.TableColumnComparatorBase.TreeTableColumnComparator;
+ import com.sun.javafx.scene.control.infrastructure.ControlTestUtils;
import com.sun.javafx.scene.control.infrastructure.StageLoader;
import com.sun.javafx.scene.control.infrastructure.VirtualFlowTestUtils;
import com.sun.javafx.scene.control.skin.VirtualScrollBar;
import com.sun.javafx.scene.control.test.Person;
import com.sun.javafx.scene.control.test.RT_22463_Person;
*** 3614,3631 ****
sl.dispose();
}
@Test public void test_rt_37429() {
- // get the current exception handler before replacing with our own,
- // as ListListenerHelp intercepts the exception otherwise
- final Thread.UncaughtExceptionHandler exceptionHandler = Thread.currentThread().getUncaughtExceptionHandler();
- Thread.currentThread().setUncaughtExceptionHandler((t, e) -> {
- e.printStackTrace();
- fail("We don't expect any exceptions in this test!");
- });
-
// table items - 3 items, 2nd item has 2 children
TreeItem<String> root = new TreeItem<>();
TreeItem<String> two = new TreeItem<>("two");
two.getChildren().add(new TreeItem<>("childOne"));
--- 3615,3624 ----
*** 3659,3677 ****
c.getAddedSubList();
}
}
});
StageLoader sl = new StageLoader(table);
table.getSelectionModel().select(0);
table.getSortOrder().add(nameColumn);
!
sl.dispose();
!
! // reset the exception handler
! Thread.currentThread().setUncaughtExceptionHandler(exceptionHandler);
}
private int rt_37429_items_change_count = 0;
private int rt_37429_cells_change_count = 0;
@Test public void test_rt_37429_sortEventsShouldNotFireExtraChangeEvents() {
--- 3652,3671 ----
c.getAddedSubList();
}
}
});
+ final Thread.UncaughtExceptionHandler exceptionHandler = ControlTestUtils.setHandler();
StageLoader sl = new StageLoader(table);
+ try {
table.getSelectionModel().select(0);
table.getSortOrder().add(nameColumn);
! } finally {
sl.dispose();
! ControlTestUtils.resetHandler(exceptionHandler);
! }
}
private int rt_37429_items_change_count = 0;
private int rt_37429_cells_change_count = 0;
@Test public void test_rt_37429_sortEventsShouldNotFireExtraChangeEvents() {
< prev index next >