liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.04k stars 112 forks source link

Solve intermittent build errors #262

Closed vadymeng0 closed 5 years ago

vadymeng0 commented 5 years ago

Description

This PR eliminates the intermittent build errors have been started to appear recently. The screenshot-based tests were intermittently failing because sometimes it took too much time for Aminal to refresh its screen after sending Enter key. Because the timeout is not constant (up to 10 seconds on my machine), I've decided to wait until the screen changes instead of just sleeping. That made the tests more robust.

Also, I added waiting for the waker() function to end at the end of the Render() function, because consecutive tests were interfering with each other.

Type of change

How Has This Been Tested?

Run tests with go test -v .\... and go test -v . many times while the system is under load. There should be no errors.

Test Configuration: