Commit f22f75c
Fix order-dependent and stale-data assertions in CompletionTest
The checkCompletionContent method had two issues:
1. Order-dependent assertions: After async computation finishes,
proposals from different processors are merged via
CompletableFuture.thenAccept(addAll), and the final ordering
depends on thread scheduling. The test assumed a fixed order.
2. Stale virtual table data: The completion proposal Table uses
SWT.VIRTUAL. When setProposals() calls clearAll(), items are
marked as unmaterialized but Widget.data is NOT cleared. The
SWT.SetData handler sets both text and data, but getData() does
not trigger SetData -- only getText()/getImage() do. The wait
condition only checked item 0's text (via isComputingInfoEntry),
leaving item 1 with stale data from the previous render.
Fixes:
- Check both items' text in the wait condition to force virtual
table materialization via SWT.SetData for both items
- Make proposal assertions order-independent
Fixes #38801 parent 357b87c commit f22f75c
File tree
1 file changed
+17
-9
lines changed- tests/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests
1 file changed
+17
-9
lines changedLines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | | - | |
212 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
213 | 218 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
221 | 229 | | |
222 | 230 | | |
223 | 231 | | |
| |||
0 commit comments