You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix random failing ServiceSupplierTestCase.testOptionalReferences eclipse-platform#488
The ServiceSupplierTestCase.testOptionalReferences test case randomly
fails. The test aims to wait for services to be enabled or disabled, but
it only waits until a single value is changed although it asserts that
multiple values are changed afterwards. This is a race condition, as the
order in which the values are changed or in which the changes are
visible is non-deterministic, also due to missing memory barriers.
This change addresses this issue via two means:
1. it makes the fields of the asserted values volatile to ensure that
changed values eventually become visible to the UI thread
2. it waits for all values to be changed before asserting their values
to allow different orders of value changes
Copy file name to clipboardExpand all lines: runtime/tests/org.eclipse.e4.core.tests/src/org/eclipse/e4/core/internal/tests/di/extensions/ServiceSupplierTestCase.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -73,11 +73,11 @@ public static class TestDisabledBean {
0 commit comments