TestEventHandlerRefreshConcurrent verifies external refreshes serialize cleanly.
(t *testing.T)
| 234 | |
| 235 | // TestEventHandlerRefreshConcurrent verifies external refreshes serialize cleanly. |
| 236 | func TestEventHandlerRefreshConcurrent(t *testing.T) { |
| 237 | eh, _, _ := newTestEventHandler(t) |
| 238 | |
| 239 | var wg sync.WaitGroup |
| 240 | for i := 0; i < 8; i++ { |
| 241 | wg.Add(1) |
| 242 | go func() { |
| 243 | defer wg.Done() |
| 244 | eh.Refresh() |
| 245 | }() |
| 246 | } |
| 247 | wg.Wait() |
| 248 | } |
| 249 | |
| 250 | // newTestEventHandler wires a minimal tab tree for keyboard and mouse tests. |
| 251 | func newTestEventHandler(t *testing.T) (*EventHandler, *Manager, *Header) { |
nothing calls this directly
no test coverage detected