New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More test fixes #8182

Merged
merged 3 commits into from Nov 30, 2017

Conversation

Projects
None yet
2 participants
@martinpitt
Member

martinpitt commented Nov 28, 2017

Fix some more test race conditions, from my test failure investigations in #8069.

martinpitt added a commit to martinpitt/cockpit that referenced this pull request Nov 28, 2017

test: Fix another race in check-terminal
Handling key presses and rendering their effect in the terminal is not
synchronous with `Browser.key_press()`. It could happen that the line
showed the keys half-typed (`admin@localhost ~]$ clea`) which would
already satisfy the following wait condition. So first wait until the
key presses got processed, then wait for the clear command to take
effect.

Closes cockpit-project#8182

@martinpitt martinpitt referenced this pull request Nov 28, 2017

Merged

test: Move from PhantomJS to Chrome Debug Protocol #8069

42 of 43 tasks complete
@mvollmer

This comment has been minimized.

Show comment
Hide comment
@mvollmer

mvollmer Nov 29, 2017

Member

Is sleep really multi threaded? I rather think we are killing two processes by accident, sleep and pmsleep, no?

Member

mvollmer commented Nov 29, 2017

Is sleep really multi threaded? I rather think we are killing two processes by accident, sleep and pmsleep, no?

@mvollmer

This comment has been minimized.

Show comment
Hide comment
@mvollmer

mvollmer Nov 29, 2017

Member

pkill -xmight help.

Member

mvollmer commented Nov 29, 2017

pkill -xmight help.

Show outdated Hide outdated test/verify/check-journal Outdated

martinpitt added some commits Nov 28, 2017

test: Robustify ABRT report test
The pkill sometimes also killed a running `pmsleep` process, which
messes up the expected stack trace and function.

    abrt-notification[2015]: Process 1858 (pmsleep) crashed in _dl_relocate_object()
    systemd-coredump[1868]: Process 1857 (sleep) of user 0 dumped core.
    systemd-coredump[1869]: Process 1858 (pmsleep) of user 0 dumped core.
test: Fix another race in check-terminal
Handling key presses and rendering their effect in the terminal is not
synchronous with `Browser.key_press()`. It could happen that the line
showed the keys half-typed (`admin@localhost ~]$ clea`) which would
already satisfy the following wait condition. So first wait until the
key presses got processed, then wait for the clear command to take
effect.

Closes #8182
test: Fix race condition in avocado checklogin-basic.py
The test was missing the `wait_visible("#login")` after the second
opening of the `/system` page. Move it to the `login()` helper function
instead  to avoid repetition.
@martinpitt

This comment has been minimized.

Show comment
Hide comment
@martinpitt

martinpitt Nov 29, 2017

Member

@mvo: Good point, thanks for pointing out! (And brown paperbag for me for not seeing that right away). I reworked the patch accordingly. I ran the test case in a loop, and it seems to work fine.

Member

martinpitt commented Nov 29, 2017

@mvo: Good point, thanks for pointing out! (And brown paperbag for me for not seeing that right away). I reworked the patch accordingly. I ran the test case in a loop, and it seems to work fine.

@mvollmer mvollmer merged commit ca09a1e into cockpit-project:master Nov 30, 2017

18 checks passed

avocado/fedora Tests passed
Details
container/kubernetes Tests passed
Details
selenium/chrome Tests passed
Details
selenium/explorer Tests passed
Details
selenium/firefox Tests passed
Details
semaphoreci The build passed on Semaphore.
Details
verify/centos-7 Tests passed
Details
verify/debian-stable Tests passed
Details
verify/debian-testing Tests passed
Details
verify/fedora-27 Tests passed
Details
verify/fedora-atomic Tests passed
Details
verify/fedora-i386 Tests passed
Details
verify/rhel-7 Tests passed
Details
verify/rhel-7-4 Tests passed
Details
verify/rhel-7-5 Tests passed
Details
verify/rhel-atomic Tests passed
Details
verify/ubuntu-1604 Tests passed
Details
verify/ubuntu-stable Tests passed
Details

@martinpitt martinpitt deleted the martinpitt:test-fixes-2 branch Nov 30, 2017

sabbaka added a commit to sabbaka/cockpit that referenced this pull request Jan 12, 2018

test: Fix another race in check-terminal
Handling key presses and rendering their effect in the terminal is not
synchronous with `Browser.key_press()`. It could happen that the line
showed the keys half-typed (`admin@localhost ~]$ clea`) which would
already satisfy the following wait condition. So first wait until the
key presses got processed, then wait for the clear command to take
effect.

Closes cockpit-project#8182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment