Commit e4d901d
test(treeview): wait for async node-view realization in TTV fixtures (AOT)
The AOT selftest failed deterministically on every TTV_ fixture that asserted
rendered node text after a single Render(), while JIT passed. Root cause is not
a product bug: per-node views host into their containers when the TreeView
realizes them, which lands a dispatcher cycle after mount — and the NativeAOT
host consistently needs one more pump cycle than JIT to get there (visible in
that TTV_AddChild_NewNodeRenders, which already did two render passes, passed
under AOT while the single-Render fixtures did not). Asserting after exactly one
Render() was a test-harness assumption, not a runtime contract.
Fix at the test layer: add a bounded WaitFor(condition) helper that pumps render
passes until the rendered content appears, and use it for the render-dependent
assertions. A genuinely blank/missing row never appears within the budget, so
the regression coverage (including the expand/collapse-cycle test) is preserved.
Also reverts the previous attempt to make hosting robust via a dispatcher-retry
attach: JIT selftests passed with the plain Loaded subscription, so Loaded does
fire in the headless host — the retry addressed a non-issue and is removed.
Hosting is back to subscribing the internal TreeViewList's
ContainerContentChanging on Loaded (idempotent), with no runtime side-effects
added for the test's sake.
Full self-test suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9591f1b commit e4d901d
2 files changed
Lines changed: 44 additions & 54 deletions
File tree
- src/Reactor/Core
- tests/Reactor.AppTests.Host/SelfTest/Fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
2023 | 2016 | | |
2024 | 2017 | | |
2025 | 2018 | | |
| |||
2042 | 2035 | | |
2043 | 2036 | | |
2044 | 2037 | | |
2045 | | - | |
2046 | | - | |
2047 | | - | |
2048 | | - | |
2049 | | - | |
2050 | | - | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | 2038 | | |
2066 | 2039 | | |
2067 | 2040 | | |
2068 | | - | |
2069 | | - | |
| 2041 | + | |
| 2042 | + | |
2070 | 2043 | | |
2071 | | - | |
| 2044 | + | |
2072 | 2045 | | |
2073 | | - | |
| 2046 | + | |
2074 | 2047 | | |
2075 | 2048 | | |
2076 | | - | |
| 2049 | + | |
2077 | 2050 | | |
2078 | 2051 | | |
2079 | 2052 | | |
| |||
2083 | 2056 | | |
2084 | 2057 | | |
2085 | 2058 | | |
2086 | | - | |
2087 | 2059 | | |
2088 | 2060 | | |
2089 | 2061 | | |
| |||
Lines changed: 35 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
50 | 65 | | |
51 | 66 | | |
52 | 67 | | |
| |||
73 | 88 | | |
74 | 89 | | |
75 | 90 | | |
76 | | - | |
| 91 | + | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
80 | 95 | | |
81 | | - | |
| 96 | + | |
82 | 97 | | |
83 | 98 | | |
84 | 99 | | |
85 | | - | |
| 100 | + | |
86 | 101 | | |
87 | 102 | | |
88 | 103 | | |
| |||
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
107 | | - | |
108 | | - | |
| 122 | + | |
| 123 | + | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| |||
144 | 159 | | |
145 | 160 | | |
146 | 161 | | |
147 | | - | |
| 162 | + | |
| 163 | + | |
148 | 164 | | |
149 | 165 | | |
150 | 166 | | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
154 | 170 | | |
155 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
156 | 174 | | |
157 | 175 | | |
158 | 176 | | |
159 | 177 | | |
160 | | - | |
| 178 | + | |
161 | 179 | | |
162 | 180 | | |
163 | 181 | | |
| |||
205 | 223 | | |
206 | 224 | | |
207 | 225 | | |
208 | | - | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
| |||
272 | 290 | | |
273 | 291 | | |
274 | 292 | | |
275 | | - | |
276 | | - | |
| 293 | + | |
| 294 | + | |
277 | 295 | | |
278 | 296 | | |
279 | 297 | | |
| |||
331 | 349 | | |
332 | 350 | | |
333 | 351 | | |
| 352 | + | |
| 353 | + | |
334 | 354 | | |
335 | 355 | | |
336 | 356 | | |
337 | | - | |
338 | | - | |
339 | | - | |
| 357 | + | |
| 358 | + | |
340 | 359 | | |
341 | 360 | | |
342 | 361 | | |
| |||
347 | 366 | | |
348 | 367 | | |
349 | 368 | | |
350 | | - | |
351 | 369 | | |
352 | | - | |
353 | | - | |
| 370 | + | |
| 371 | + | |
354 | 372 | | |
355 | 373 | | |
356 | 374 | | |
| |||
0 commit comments