Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Jan 14, 2026

The test testElementHierarchyInContext_HandledItem was failing randomly because the handler registration is asynchronous and might not be complete when the menu item execution is triggered.

This change adds a wait loop that checks for the menu item enablement, which is a reliable indicator that the handler is registered and the command is ready. It also increases the robustness of testElementHierarchyInContext_DirectItem by spinning the event loop multiple times.

Fixes #1737

@vogella vogella marked this pull request as draft January 14, 2026 10:34
@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 63936db927bad4208491bca261d202fff9ea4bd9 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Wed, 14 Jan 2026 10:39:16 +0000
Subject: [PATCH] Version bump(s) for 4.39 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
index 554b5c1479..e4549f5e79 100644
--- a/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench;singleton:=true
-Bundle-Version: 1.18.100.qualifier
+Bundle-Version: 1.18.200.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.52.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 21m 45s ⏱️ + 4m 12s
 8 270 tests ±0   8 022 ✅ +1  248 💤 ±0  0 ❌  - 1 
23 634 runs  ±0  22 843 ✅ +1  791 💤 ±0  0 ❌  - 1 

Results for commit 4fcf946. ± Comparison against base commit 128b1f3.

♻️ This comment has been updated with latest results.

…dItem

The test testElementHierarchyInContext_HandledItem was failing randomly because
the handler registration is asynchronous and might not be complete when the
menu item execution is triggered.

This change adds a wait loop that checks for the menu item enablement, which
is a reliable indicator that the handler is registered and the command is ready.
It also increases the robustness of testElementHierarchyInContext_DirectItem
by spinning the event loop multiple times.

Fixes eclipse-platform#1737
@vogella vogella force-pushed the issue-1737-fix-random-failing-test branch from 2006a5c to 4fcf946 Compare January 15, 2026 08:20
@vogella vogella marked this pull request as ready for review January 15, 2026 08:20
@vogella vogella merged commit bfb48af into eclipse-platform:master Jan 16, 2026
18 checks passed
@vogella vogella deleted the issue-1737-fix-random-failing-test branch January 16, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random failing MMenuItemTest.testElementHierarchyInContext_HandledItem

2 participants