Skip to content

Conversation

@jonahgraham
Copy link
Contributor

@jonahgraham jonahgraham commented Nov 28, 2025

For a while we have suffered with patchy tests due to limited connectivity to external websites when running Browser tests.

This commit brings in a new Http Server based on the now available Java 21 simple web server available in the JDK. This is sufficient to test the various paths currently used in the browser tests, and make them reliable (or at least more resilient against external sites going dark)

Fixes #2804

Fixes #2561

This has as a parent commit PR #2824

@jonahgraham jonahgraham marked this pull request as draft November 28, 2025 03:12
@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Nov 28, 2025

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
examples/org.eclipse.swt.examples.ole.win32/pom.xml
examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From cb5d85a6d22f216c3f980fce235d90a64d11929e Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Fri, 28 Nov 2025 13:52:46 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
index ab0cf5f759..23460be600 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.browser.demos/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.SWTBrowserDemos.name
 Bundle-SymbolicName: org.eclipse.swt.examples.browser.demos; singleton:=true
-Bundle-Version: 3.108.600.qualifier
+Bundle-Version: 3.108.700.qualifier
 Bundle-Activator: org.eclipse.swt.examples.browser.demos.BrowserDemoPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
index fdd3c6f1b0..fe6a19331b 100644
--- a/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.launcher/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.SWTLauncherExample.name
 Bundle-SymbolicName: org.eclipse.swt.examples.launcher; singleton:=true
-Bundle-Version: 3.108.600.qualifier
+Bundle-Version: 3.108.700.qualifier
 Bundle-Activator: org.eclipse.swt.examples.launcher.LauncherPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
index 36ef8c27a5..480e6a3c60 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.SWTOLEExample.name
 Bundle-SymbolicName: org.eclipse.swt.examples.ole.win32; singleton:=true
-Bundle-Version: 3.109.400.qualifier
+Bundle-Version: 3.109.500.qualifier
 Bundle-Activator: org.eclipse.swt.examples.ole.win32.OlePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/examples/org.eclipse.swt.examples.ole.win32/pom.xml b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
index fcf61342bd..c3090f0a25 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/pom.xml
+++ b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
@@ -20,7 +20,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.swt.examples.ole.win32</artifactId>
-  <version>3.109.400-SNAPSHOT</version>
+  <version>3.109.500-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <build>
diff --git a/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
index d32085fde8..8388aff8df 100644
--- a/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.views/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.SWTPaintExample.name
 Bundle-SymbolicName: org.eclipse.swt.examples.views;singleton:=true
-Bundle-Version: 3.108.600.qualifier
+Bundle-Version: 3.108.700.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime,
-- 
2.51.2

Further information are available in Common Build Issues - Missing version increments.

@jonahgraham
Copy link
Contributor Author

The Windows tests I modified are currently failing - I tried to make these new test more robust. For example in the POST test we were just checking that the returned data was "big enough" without checking content. I have changed that to make sure the results are exactly as expected, which works on Linux. But Edge + IE both re-interpret/re-format the HTML leading to comparison errors.

For example: expected: <!DOCTYPE html><html><head> but was <HTML><HEAD><TITLE>.

I also think newlines change too. I'll provide an update that loosens the new requirements I just added.


This new server uses http://localhost:PORT where PORT is assigned per test (standard way using port 0 to get free port).


A while ago all the tests were changed from http: -> https: and this goes back to http:. There is a comment in the code that said:

"please use https instead, http do not work on mac out of the box and your test will hang there!"

But the tests all seem to pass on macOS. I will spin this up on my mac machine to make sure they work locally too.

I can add https to the webserver, but there is a few hoops to jump through to make keys. However I don't think the functionality being tested needs https. In reality we should have some https tests - for example to make sure that failed certs are somewhat displayed to users, but AFAICT there are no such tests today.

@jonahgraham
Copy link
Contributor Author

This pull request changes some projects for the first time in this development cycle.

This is really a parent commit - PR #2824 problem.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Test Results

  115 files   -  3    115 suites   - 3   13m 23s ⏱️ - 2m 52s
4 616 tests  - 37  4 600 ✅  - 36  16 💤  - 1  0 ❌ ±0 
  320 runs   - 18    317 ✅  - 17   3 💤  - 1  0 ❌ ±0 

Results for commit d6f9bb5. ± Comparison against base commit a0d6ffc.

This pull request removes 37 tests.
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_dollarSign
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_emptyString
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letterA
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16LE_null
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_AsciiLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_Asciiletter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_LotsOfLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letters
…
This pull request skips 1 test.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Shell ‑ test_activateEventSend

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham marked this pull request as ready for review November 28, 2025 04:09
For a while we have suffered with patchy tests due to limited connectivity
to external websites when running Browser tests.

This commit brings in a new Http Server based on the now available
Java 21 simple web server available in the JDK. This is sufficient
to test the various paths currently used in the browser tests, and
make them reliable (or at least more resilient against external sites
going dark)

Fixes eclipse-platform#2804

Fixes eclipse-platform#2561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants