Skip to content

Commit 2d98fe6

Browse files
committed
8245601: TESTBUG] Disable TabPaneDragPolicyTest on Mac until JDK-8213136 is fixed and fix ISE
Reviewed-by: kcr
1 parent f3190db commit 2d98fe6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/system/src/test/java/test/robot/javafx/scene/TabPaneDragPolicyTest.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
2424
*/
2525
package test.robot.javafx.scene;
2626

27+
import com.sun.javafx.PlatformUtil;
28+
2729
import javafx.application.Application;
2830
import javafx.application.Platform;
2931
import javafx.collections.ListChangeListener;
@@ -47,6 +49,7 @@
4749
import org.junit.BeforeClass;
4850
import org.junit.Test;
4951
import static org.junit.Assert.fail;
52+
import static org.junit.Assume.assumeTrue;
5053

5154
import test.util.Util;
5255

@@ -138,6 +141,8 @@ public static void main(String[] args) {
138141

139142
@Test
140143
public void testReorderTop() {
144+
// Disable on Mac until JDK-8213136 is fixed
145+
assumeTrue(!PlatformUtil.isMac());
141146
expectedTab = tabs[1];
142147
setDragPolicyAndSide(TabPane.TabDragPolicy.REORDER, Side.TOP);
143148
tabPane.getTabs().addListener(reorderListener);
@@ -151,6 +156,8 @@ public void testReorderTop() {
151156

152157
@Test
153158
public void testReorderBottom() {
159+
// Disable on Mac until JDK-8213136 is fixed
160+
assumeTrue(!PlatformUtil.isMac());
154161
expectedTab = tabs[1];
155162
setDragPolicyAndSide(TabPane.TabDragPolicy.REORDER, Side.BOTTOM);
156163
tabPane.getTabs().addListener(reorderListener);
@@ -164,6 +171,8 @@ public void testReorderBottom() {
164171

165172
@Test
166173
public void testReorderLeft() {
174+
// Disable on Mac until JDK-8213136 is fixed
175+
assumeTrue(!PlatformUtil.isMac());
167176
expectedTab = tabs[1];
168177
setDragPolicyAndSide(TabPane.TabDragPolicy.REORDER, Side.LEFT);
169178
tabPane.getTabs().addListener(reorderListener);
@@ -177,6 +186,8 @@ public void testReorderLeft() {
177186

178187
@Test
179188
public void testReorderRight() {
189+
// Disable on Mac until JDK-8213136 is fixed
190+
assumeTrue(!PlatformUtil.isMac());
180191
expectedTab = tabs[1];
181192
setDragPolicyAndSide(TabPane.TabDragPolicy.REORDER, Side.RIGHT);
182193
tabPane.getTabs().addListener(reorderListener);
@@ -290,7 +301,7 @@ public void testReorder(int dX, int dY, int xIncr, int yIncr, boolean isFixed) {
290301
waitForLatch(releaseLatch, 5, "Timeout waiting for robot.mouseRelease(Robot.MOUSE_LEFT_BTN).");
291302

292303
if (isFixed) {
293-
tabPane.getSelectionModel().select(tabs[2]);
304+
Util.runAndWait(() -> tabPane.getSelectionModel().select(tabs[2]));
294305
waitForLatch(latches[2], 5, "Timeout waiting tabs[2] to get selected.");
295306
latches[0] = new CountDownLatch(1);
296307
}

0 commit comments

Comments
 (0)