Skip to content

Draft: Test suite: make evince "Print to File" test more robust

intrigeri requested to merge test/make-evince-print-to-file-more-robust into stable

On !285 (merged) I've seen 1 failure that rings no bell for me, which seems to be caused by obviously racy code in our test suite.

Scenario I can view and print a PDF file stored in non-persistent /home/amnesia
Given I have started Tails from DVD without network and logged in 5.085
And I copy "/usr/share/cups/data/default-testpage.pdf" to "/home/amnesia" as user "amnesia" 0.285
When I open "/home/amnesia/default-testpage.pdf" with Evince 18.720
Then I see "CupsTestPage.png" after at most 40 seconds 5.592
And I can print the current document to "/home/amnesia/output.pdf" 24.366
The document was not printed to /home/amnesia/output.pdf (Timeout::Error)
./features/support/helpers/misc_helpers.rb:126:in `rescue in try_for'
./features/support/helpers/misc_helpers.rb:50:in `try_for'
./features/step_definitions/evince.rb:17:in `/^I can print the current document to "([^"]+)"$/'
features/evince.feature:22:in `And I can print the current document to "/home/amnesia/output.pdf"'

The video shows that pasting the desired destination filename did not take effect. I see we're pressing "Return" immediately after CTRL+v, so this looks like a race condition. Let's sleep a bit to increase the chance we don't lose the race.

Edited by intrigeri

Merge request reports