{"action":"created","issue":{"url":"https://api.github.com/repos/cockpit-project/cockpit/issues/8656","repository_url":"https://api.github.com/repos/cockpit-project/cockpit","labels_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/8656/labels{/name}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/8656/comments","events_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/8656/events","html_url":"https://github.com/cockpit-project/cockpit/pull/8656","id":298551757,"number":8656,"title":"test: Fix expect_load() races","user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"labels":[{"id":88467047,"url":"https://api.github.com/repos/cockpit-project/cockpit/labels/needswork","name":"needswork","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-20T11:01:34Z","updated_at":"2018-02-20T21:15:41Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/8656","html_url":"https://github.com/cockpit-project/cockpit/pull/8656","diff_url":"https://github.com/cockpit-project/cockpit/pull/8656.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/8656.patch"},"body":"PR #8606 fixed the \"CDP command, then expect_load\" race for\r\n`Browser.open()`, as that was the most prominent (and only observed)\r\nfailure. However, in principle this affects every other scenario as\r\nwell, e. g. clicking a Log In button or navigation menu entry, whose\r\npage load could then happen before calling `expect_load()`.\r\n\r\nGeneralize the approach by setting up the `Page.loadEventFired()`\r\npromise before every CDP command, except for `expectLoad()` itself, and\r\nthen make the latter just wait on that promise.\r\n\r\n----\r\n\r\n~This is WIP for now, as this might cause some fallout from tests which use expect_load() wrongly. But let's fix these, as I believe the general approach of this is better than the status quo.~ However, if someone has an idea how to make the code less ugly, I'm all ears!\r\n\r\n - [x] PR #8606"},"comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/issues/comments/367121945","html_url":"https://github.com/cockpit-project/cockpit/pull/8656#issuecomment-367121945","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/8656","id":367121945,"user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T21:15:41Z","updated_at":"2018-02-20T21:15:41Z","author_association":"OWNER","body":"container/kubernetes test fails repeatedly"}}
{"actor":{"display_login":"martinpitt"}}