eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Test_org_eclipse_swt_browser_Browser.test_setUrl_remote_with_post fails on GHA Windows build

Open iloveeclipse opened this issue 3 months ago • 4 comments

Looks like change of Gihub Windows 2025 runner also broke Test_org_eclipse_swt_browser_Browser.test_setUrl_remote_with_post test on Windows (see similar issue with keys https://github.com/eclipse-platform/eclipse.platform.swt/issues/2516).

Seen on

  • https://github.com/eclipse-platform/eclipse.platform.swt/pull/2555,
  • https://github.com/eclipse-platform/eclipse.platform.swt/pull/2560

Stack from https://github.com/eclipse-platform/eclipse.platform.swt/runs/51571267543

Test timed out. ProgressListener not fired 
Test log:
checkInternet() passedSetting Browser url to:https://bugs.eclipse.org/bugs/buglist.cgi
java.lang.AssertionError: 
Test timed out. ProgressListener not fired 
Test log:
checkInternet() passedSetting Browser url to:https://bugs.eclipse.org/bugs/buglist.cgi
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_setUrl_remote_with_post(Test_org_eclipse_swt_browser_Browser.java:1251)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	Suppressed: java.lang.Throwable: Screenshot written to C:\Users\RUNNER~1\AppData\Local\Temp\org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_setUrl_remote_with_post[browser flags: 524,288].png
		at org.eclipse.test.Screenshots$ScreenshotOnFailure.failed(Screenshots.java:41)
Running Test_org_eclipse_swt_browser_Browser#test_setUrl_remote_with_post[browser flags: 524,288]
AWT screenshot saved to: C:\Users\RUNNER~1\AppData\Local\Temp\org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_setUrl_remote_with_post[browser flags: 524,288].png

iloveeclipse avatar Sep 30 '25 08:09 iloveeclipse

@rgrunber , @akurtakov : the test introduced via e381d207cb461db072e6cc75b35c048984347aa6 uses bugzilla for "post" requests. I guess bugzilla will not support that soon? Do you have an idea which other server at eclipse.org can be "misused" for testing post requests?

Should we disable the test method now for Windows on Github only (similar to https://github.com/eclipse-platform/eclipse.platform.swt/pull/2559) or disable itt completely?

iloveeclipse avatar Sep 30 '25 08:09 iloveeclipse

The test is valuable so ideally shouldn't be just disabled. Ideally, the test should start it's own httpserver (https://docs.oracle.com/en/java/javase/21/docs/api/jdk.httpserver/com/sun/net/httpserver/HttpServer.html ? ) and use it for testing purposes. I have no clue about Windows and will defer that part to @HeikoKlare .

akurtakov avatar Sep 30 '25 08:09 akurtakov

Maybe www.eclipse.org, based on https://bugs.eclipse.org/bugs/show_bug.cgi?id=506001#c4 ? Although I wouldn't be surprised if that stopped working as well.

rgrunber avatar Sep 30 '25 12:09 rgrunber

My best guess is that this failure is not related to the change to Windows Server 2025 in GHA. I expect this to be a long-standing flaky test like several other tests executed on Edge/WebView2 which all seem to be related to progress listeners, see e.g.:

  • https://github.com/eclipse-platform/eclipse.platform.swt/issues/2363
  • https://github.com/eclipse-platform/eclipse.platform.swt/issues/2098
  • https://github.com/eclipse-platform/eclipse.platform.swt/issues/2113
  • ...

We had already invested quite some time in finding the cause of this issue, without any success so far. Fortunately, the failures do not appear too often (though they are still very annoying).

HeikoKlare avatar Oct 04 '25 12:10 HeikoKlare

@rgrunber , @akurtakov : the test introduced via e381d20 uses bugzilla for "post" requests. I guess bugzilla will not support that soon? Do you have an idea which other server at eclipse.org can be "misused" for testing post requests?

I have a probable solution for this (as @akurtakov suggested in https://github.com/eclipse-platform/eclipse.platform.swt/issues/2561#issuecomment-3350710042) - i.e. no more using external sites - by using the HttpServer that is part of Java21. PR incoming soon-ish. This part is the same problem as https://github.com/eclipse-platform/eclipse.platform.swt/issues/2804

@HeikoKlare if my incoming PR solves this problem I will close this issue as I think the items listed in https://github.com/eclipse-platform/eclipse.platform.swt/issues/2561#issuecomment-3368172037 are independent.

jonahgraham avatar Nov 28 '25 02:11 jonahgraham