|
102 | 102 | @FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
103 | 103 | public class Test_org_eclipse_swt_browser_Browser extends Test_org_eclipse_swt_widgets_Composite {
|
104 | 104 |
|
105 |
| - // TODO Reduce to reasonable value |
106 |
| - private static Duration MAXIMUM_BROWSER_CREATION_TIME = Duration.ofSeconds(90); |
| 105 | + private static Duration MAXIMUM_BROWSER_CREATION_TIME = Duration.ofSeconds(10); |
107 | 106 |
|
108 | 107 | static {
|
109 | 108 | try {
|
110 | 109 | printSystemEnv();
|
111 | 110 | } catch (Exception e) {
|
112 | 111 | e.printStackTrace();
|
113 | 112 | }
|
114 |
| - System.setProperty("org.eclipse.swt.internal.win32.Edge.timeout", Long.toString(MAXIMUM_BROWSER_CREATION_TIME.toMillis())); |
| 113 | + System.setProperty("org.eclipse.swt.internal.win32.Edge.timeout", Long.toString(Duration.ofSeconds(90).toMillis())); |
115 | 114 | }
|
116 | 115 |
|
117 | 116 | // CONFIG
|
@@ -165,10 +164,11 @@ public Test_org_eclipse_swt_browser_Browser(int swtBrowserSettings) {
|
165 | 164 |
|
166 | 165 | @BeforeClass
|
167 | 166 | public static void setupEdgeEnvironment() {
|
168 |
| - // initialize Edge environment before any test runs to isolate environment setup |
| 167 | + // Initialize Edge environment before any test runs to isolate environment setup |
| 168 | + // as this takes quite long in GitHub Actions builds |
169 | 169 | if (SwtTestUtil.isWindows) {
|
170 | 170 | Shell shell = new Shell();
|
171 |
| - new Browser(shell, SWT.EDGE); |
| 171 | + new Browser(shell, SWT.EDGE).getUrl(); |
172 | 172 | shell.dispose();
|
173 | 173 | }
|
174 | 174 | }
|
@@ -2846,7 +2846,12 @@ private static List<String> getOpenedDescriptors() {
|
2846 | 2846 | try(DirectoryStream<Path> directoryStream = Files.newDirectoryStream(fd)){
|
2847 | 2847 | directoryStream.forEach(f -> {
|
2848 | 2848 | try {
|
2849 |
| - paths.add(Files.isSymbolicLink(f)? Files.readSymbolicLink(f).toString() : f.toString()); |
| 2849 | + // Do not consider file descriptors of Maven artifacts that are currently opened by other Maven |
| 2850 | + // plugins executed in parallel build (such as parallel compilation of the swt.tools bundle etc.) |
| 2851 | + String resolvedPath = Files.isSymbolicLink(f)? Files.readSymbolicLink(f).toString() : f.toString(); |
| 2852 | + if (!resolvedPath.contains(".m2")) { |
| 2853 | + paths.add(resolvedPath); |
| 2854 | + } |
2850 | 2855 | } catch (IOException e) {
|
2851 | 2856 | e.printStackTrace();
|
2852 | 2857 | }
|
|
0 commit comments