Skip to content
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

check-storage-msdos: Fix race by waiting for UI to update #9359

Conversation

mareklibra
Copy link
Contributor

Observed within work on #9263 .

@mareklibra mareklibra mentioned this pull request Jun 11, 2018
44 tasks
@allisonkarlitskaya
Copy link
Member

ubuntu-stable seems to have a relevant test failure (same test), which I am able to reproduce locally on fedora-28.

That said, I have no idea how your changes might have caused that. Probably there is more here that needs fixing...

teststorage-testdosparts-fedora-28-127 0 0 2-2201-fail

@mareklibra
Copy link
Contributor Author

@allisonkarlitskaya , this will be most probably fixed by #9360 .
Chicken-egg here ...

@mvollmer
Copy link
Member

ubuntu-stable seems to have a relevant test failure

From the journal:

Jun 11 06:01:44 ibm-p8-kvm-03-guest-02 systemd[1]: udisks2.service: Main process exited, code=killed, status=6/ABRT

This might have been fixed in more recent versions of UDisks2, it's probably worth trying to dig that out.

Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@@ -73,7 +73,7 @@ class TestStorage(StorageCase):
# not offered.
self.content_row_action(3, "Create Partition")
self.dialog_wait_open()
self.assertEqual(b.attr("[value='dos-extended']", "class"), "disabled")
b.wait_present("li[value='dos-extended'].disabled")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix seems harmless, and regardless of the other failures, I have yet to see anything bad introduced by this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it's not motivated by the code, or is it? When the dialog opens, the dropdown has been created and will not change while the dialog is open.

There might well be a race condition somewhere, but the race is over once the dialog is open, I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the original test was very strict: If the entry had any class in addition to "disabled", it would fail. Is that the case maybe after moving to full React?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvollmer , right, the code does not seem changing it once initially set.
I observed this issue when moving to React, not sure if it was there before.
Adding "wait to render" seemed to fix it and this change looks harmless to me in this case.

There's mixture of jquery and React in the code, hard to say if it is related without deep investigation.

I can extend the test for uniqueness of the disabled if needed. What do you think?

@allisonkarlitskaya allisonkarlitskaya merged commit 090dad9 into cockpit-project:master Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants