Commit b27b470
Fix FrameSimulationLifecycleTest: fire run-listeners directly in MockSimulationContext.run()
ContextTransformer.createSimulationContext() freezes the delegate before returning,
so delegate.freeze() in run() hit the if (!frozen) guard and was a no-op — no
PropertyChangeEvent ever fired and the 3 FrameSimulationLifecycleTest latches timed out.
Override addPropertyChangeListener/removePropertyChangeListener to maintain a shadow
runListeners list. run() now fires ContextChangeEvent("frozen", false, true) from
runListeners directly, bypassing the frozen-state guard. Listeners are still also
delegated to the underlying DefaultSimulationContext so Frame's statusBar listener
continues to receive real property-change events.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 58137f6 commit b27b470
1 file changed
Lines changed: 19 additions & 4 deletions
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
84 | 97 | | |
85 | 98 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
| |||
0 commit comments