Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute browser tests for Edge #671 #672

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented May 15, 2023

Browser tests were only executed for the default configuration of a system's browser using the SWT.NONE flag. Other configurations, such as using the Edge browser in Windows, were not tested.

This change parameterizes the browser tests to also execute them for the Edge browser on Windows. It also deactivates those tests for the Edge browser for which the implementation does (currently) not work. This allows to detect regressions when performing future changes to the Edge browser.

Fixes #671

@github-actions
Copy link
Contributor

github-actions bot commented May 15, 2023

Test Results

   383 files  ±  0     383 suites  ±0   6m 14s ⏱️ + 1m 15s
 4 284 tests ±  0   4 274 ✅ +  3  10 💤  - 3  0 ❌ ±0 
12 336 runs  +189  12 245 ✅ +181  91 💤 +8  0 ❌ ±0 

Results for commit 9e665c1. ± Comparison against base commit 9339c92.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the issue-671 branch 8 times, most recently from abe200b to f4ac8dc Compare May 22, 2023 15:49
HeikoKlare added a commit to HeikoKlare/eclipse.platform.swt that referenced this pull request May 22, 2023
…latform#671

Browser tests were only executed for the default configuration of a
system's browser using the SWT.NONE flag. Other configurations, such as
using the Edge browser in Windows, were not tested.

This change parameterizes the browser tests to also execute them for the
Edge browser on Windows. It also deactivates those tests for the Edge
browser for which the implementation does (currently) not work. This
allows to detect regressions when performing future changes to the Edge
browser.

Fixes eclipse-platform#672
@HeikoKlare HeikoKlare force-pushed the issue-671 branch 3 times, most recently from 31c2a39 to 549a829 Compare May 23, 2023 13:57
@HeikoKlare HeikoKlare marked this pull request as ready for review May 23, 2023 15:25
Comment on lines +232 to +260
if (isEdge) {
// wait for and process pending events to properly cleanup Edge browser resources
do {
processUiEvents();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
} while (Display.getCurrent().readAndDispatch());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary because otherwise some OS events that are somehow produced by one test occur and are processed by the next test and may interfere with the Edge browser instantation. I have invested quite some time to identify where the events come from and how to properly handle them, but I did not find a proper way to do so. If someone is able to identify the reasons for the events and how to properly process them, I would be glad to have a better solution than this,

@vogella
Copy link
Contributor

vogella commented Jun 14, 2023

@HeikoKlare can this be merged?

@jukzi
Copy link
Contributor

jukzi commented Jun 15, 2023

creating browser took too long: 23469ms
java.lang.AssertionError: creating browser took too long: 23469ms
	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.createBrowser(Test_org_eclipse_swt_browser_Browser.java:290)
	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.setUp(Test_org_eclipse_swt_browser_Browser.java:173)

@HeikoKlare HeikoKlare marked this pull request as draft June 16, 2023 12:26
@HeikoKlare
Copy link
Contributor Author

I converted this back to draft due to the recent test failure and I will have another look at it.
Further increasing the waiting time between test cases would probably "solve"(/hide) the problem, but I'd prefer a solution that makes waiting times between test cases obsolete.

Browser tests were only executed for the default configuration of a
system's browser using the SWT.NONE flag. Other configurations, such as
using the Edge browser in Windows, were not tested. A parameterization
has been added to allow other configurations to be tested.

This change adds Edge to the test configurations executed for the
browser. This allows to detect regressions when performing future
changes to the Edge browser.

Fixes
eclipse-platform#671

Co-authored-by: Federico Jeanne <[email protected]>
@fedejeanne
Copy link
Contributor

Test failures in Linux are unrelated #1564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edge Edge Browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser tests are not executed for Edge browser
5 participants