-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Enable UI harness for wizard tests and prevent async execution deadlocks #47
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
Conversation
Rebasing with main fails in this branch. |
…eadlocks This commit fixes the NewVaadinProjectWizardTest and prevents test hangs: 1. Configure UI harness for proper Eclipse UI context in tests: - Set useUIHarness=true and useUIThread=true in pom.xml - Add -XstartOnFirstThread for macOS compatibility - This allows wizard tests to run with proper JFace/SWT initialization 2. Fix deadlock in CopilotRestService.handleShowInIde: - Changed syncExec() to asyncExec() to prevent UI thread blocking - Prevents test hangs when running with UI harness - Maintains functionality for normal IDE usage These changes ensure all 71 tests pass successfully including: - NewVaadinProjectWizardTest (10 tests) - CopilotClientIntegrationTest (14 tests) - All other test suites 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Should work now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this PR works fine in my local, with a result of all tests passing, in the GH runner it fails.
There is not verification in the workflow, thus not sure if we should fix issues in this PR or when verification is added to the branch
<include>**/AllTests.java</include> | ||
</includes> | ||
<!-- Don't specify product/application, let Eclipse use defaults --> | ||
<argLine>-XstartOnFirstThread</argLine> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the container configured for the GH workflow, this argument is not supported:
[INFO] Selected Provider: junit 4.0.0
[INFO] Executing test runtime with timeout (seconds): 0, logs, if any, will be placed at: /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/work/data/.metadata/.log
[INFO] Command line:
[/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.8-9.0.LTS/x64/bin/java, -Dosgi.noShutdown=false, -Dosgi.os=linux, -Dosgi.ws=gtk, -Dosgi.arch=x86_64, -XstartOnFirstThread, -Dosgi.clean=true, -jar, /root/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.6.700.v20240213-1244/org.eclipse.equinox.launcher-1.6.700.v20240213-1244.jar, -data, /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/work/data, -install, /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/work, -configuration, /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/work/configuration, -application, org.eclipse.tycho.surefire.osgibooter.uitest, -testproperties, /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/surefire.properties]
Unrecognized option: -XstartOnFirstThread
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
<version>${tycho-version}</version> | ||
<configuration> | ||
<useUIHarness>false</useUIHarness> | ||
<useUIHarness>true</useUIHarness> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work in the container for GH workflow
!SESSION 2025-09-08 08:32:38.286 -----------------------------------------------
eclipse.buildId=unknown
java.version=21.0.8
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/surefire.properties
Command-line arguments: -data /Users/manolo/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/work/data -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/manol
o/Current/eclipse-plugin/vaadin-eclipse-plugin.tests/target/surefire.properties
!ENTRY org.eclipse.osgi 4 0 2025-09-08 08:32:40.621
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi4-gtk-4964r8 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4-gtk in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi4-gtk-4964r8.so
Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi4-gtk.so
Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi4.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:97)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:170)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:725)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:185)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:182)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:34)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:129)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:44)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
```
Maybe we can tackle that in #51 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests passing in my local, good job !
This commit fixes the NewVaadinProjectWizardTest and prevents test hangs:
Configure UI harness for proper Eclipse UI context in tests:
Fix deadlock in CopilotRestService.handleShowInIde:
These changes ensure all 71 tests pass successfully including: