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
[X] Bug fix (non-breaking change which fixes an issue)
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.
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 theRender()
function, because consecutive tests were interfering with each other.Type of change
How Has This Been Tested?
Run tests with
go test -v .\...
andgo test -v .
many times while the system is under load. There should be no errors.Test Configuration:
Debian stretch