Repository navigation
test: report failed Test App listener POSTs on stderr, not in the test body - #5415
Open
ShryukGrandhi wants to merge 1 commit into
Conversation
…t body A failed POST from start_test was logged with robot.api.logger, which put the message ahead of the test's first keyword and broke LOG 1.1 checks in robotstatuschecker. Fixes MarketSquare#5360 Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
This branch has not been deployed
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.
Summary
atest/library/test_app_listener.pylogged a failed POST to the Test App withrobot.api.logger.debug. When that happened instart_test, the message became the first item in the test body, ahead of the first keyword, so a[Documentation]check likeLOG 1.1:...pointed at the message and robotstatuschecker failed a test whose keywords all passed (seen on the Windows BrowserBatteries job in #5358).Changes
sys.__stderr__instead of the Robot Framework log, so it never lands in a test or suite body. It still shows up in the console / pabot worker output.utest/test_test_app_listener.pyruns a one-keyword suite with the listener,--loglevel DEBUGand${SERVER}pointing at a closed port, and checks the test body contains only the keyword.The 2 s timeout is unchanged. Once this is on
main, the known cause can be added totools/ci_failures/known_causes.json.Testing
[Message, Keyword, Message]; the new unit test fails on the old listener and passes with the fix.pytest --no-cov utest/test_test_app_listener.pypasses.ruff format --checkon the touched files is clean.Fixes #5360