Repository navigation
Conversation
- feedCmd skips a command that needs more than 200 ms, so that a test does not wait for a tea.Tick. Two tests need a command that can need more on Windows in CI. TestE2E_LoginFailure waits for a refused connection. TestE2E_CacheSurvivesRestart waits for the load of the home screen, which sends its requests and writes to the database file in one command. The two tests failed at times on Windows, and passed in the next run of the same commit. - feedCmdWithin is feedCmd with a wait of its own. The two tests use it with slowCmdWait (15 seconds) for these commands. feedCmd is as it was for each other test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
Closed with no merge. The commit goes to main directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
Two tests of
internal/appfailed at times on Windows in CI, and passed in the next run of the same commit:TestE2E_LoginFailure:expected login error after failed attemptTestE2E_CacheSurvivesRestart:home should not be loading after first initIn the seven CI runs of the pull requests #8 and #9 and of their merges, the Windows job failed on the first attempt in four runs (
0ea2185,7f54726,1588e30,730bab6).The helper
feedCmdruns a command and gives its message toUpdate. It skips a command that needs more than 200 ms, so that a test does not wait for atea.Tick. Each of the two tests needs the result of a command that can need more than 200 ms:TestE2E_LoginFailurewaits for a refused connection to127.0.0.1:1.TestE2E_CacheSurvivesRestartis the only E2E test that runsInitwith a real cache store. The load of the home screen sends its requests and writes to the SQLite file in one command.feedCmdthen skipped the command, and the model did not get the message.What changes
feedCmdWithinisfeedCmdwith a wait of its own.feedCmdcalls it with the 200 ms of before, so each other test is as it was.feedCmdWithinwithslowCmdWait(15 seconds) for the command that they need. 15 seconds is longer than the timeout of one request ofabs.Client(10 seconds).AGENTS.mdhas the rule for new tests.No code of pine or spruce changes.
How it was tested
The failures do not occur on Linux. A copy of the repository got two delays, which are not in this pull request:
TestE2E_LoginFailureuses a listener that closes each connection after 400 ms, with no answer.main(b89f0fb)e2e_test.go:126: expected login error after failed attemptande2e_test.go:2284: home should not be loading after first init, the messages of the Windows job-count=20Checks on Linux, on the commit of this pull request, in a clean copy of the commit:
gofmt -l .: no filego vet ./...: passgolangci-lint runwith version 2.14.0: 0 issuesPINE_REQUIRE_LIBMPV=1 PINE_REQUIRE_DBUS=1 go test ./... -count=1: 855 tests passgo test -race ./internal/app/ -count=1: passNot tested
TestE2E_LoginFailure), from the code offeedCmd, and from the reproduction with the delays.Not changed
feedCmdwith 200 ms. A work command of a different test that needs more than 200 ms is skipped as before. No other test failed in those seven CI runs.TestE2E_CacheSurvivesRestartnow waits for the 500 mstea.Tickof the home screen in each of its twoInitcalls, because that tick is shorter than the wait. The test needs about 1 second.🤖 Generated with Claude Code