Bug 509242 - Sort out real input events when running UI tests with synthesized JavaFX events.
Summary: Sort out real input events when running UI tests with synthesized JavaFX events.
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF MVC (show other bugs)
Version: 1.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-14 12:56 EST by Matthias Wienand CLA
Modified: 2019-06-01 03:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Wienand CLA 2016-12-14 12:56:30 EST
Currently, the UI tests synthesize JavaFX events to ensure consistent behavior across different operating systems and windowing toolkits. However, real input events are not sorted out by the EventDispatcher, so they can interfere with synthesized events. This can lead to errors as the tests only expect the specified events to be fired. Therefore, we should sort out real (i.e. non-synthesized) events when running the UI tests.
Comment 1 Matthias Wienand CLA 2019-03-01 07:57:50 EST
I implemented sorting out of real input events on the master branch. However, we should observe if some tests are still flaky. If the fix is good enough, I will resolve this ticket as fixed for 5.1.0 (2019-06).
Comment 2 Tamas Miklossy CLA 2019-06-01 03:53:21 EDT
Jenkins still reports (from time to time) some flaky behavior in the org.eclipse.gef.mvc.tests.fx.ClickDragGestureTests.singleExecutionTransactionUsedForInteraction test case:

Error Message

No execution transaction should have been closed expected:<0> but was:<1>

Stacktrace

java.lang.AssertionError: No execution transaction should have been closed expected:<0> but was:<1>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:555)
	at org.eclipse.gef.mvc.tests.fx.ClickDragGestureTests$4.run(ClickDragGestureTests.java:136)
	at org.eclipse.gef.mvc.tests.fx.rules.FXNonApplicationThreadRule.lambda$7(FXNonApplicationThreadRule.java:622)
	at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
	at java.lang.Thread.run(Thread.java:748)