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

[FW][FIX] fix random errors in tour tests #57145

Closed
wants to merge 1 commit into from

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Sep 7, 2020

Description of the issue/feature this PR addresses:

The simplified version of run method looks like this:

run: function(){
    this.pause();
    setTimeout(function(){
        this.play();
    }, 0)
    window.location.href = tour.url;
}

That is, if page is not reloaded, the tour starts immediately. Unfortunately, in rare cases, the method in setTimeout is executed earlier than reloading happens. It brokes the whole tour. For example:

  • phantom_js/browse_js (in python) opens "/web"
  • odoo updates "/web" to "/web#action=123&...."
  • method run (in js) starts loading "/web"
  • few steps are executed before the reloading, e.g. step "Open Point Of Sale menu"
  • headless browser reloads page back to "/web"
  • tour system cannot execute next step, because we are not in Point Of Sale men
  • tour system raise error

This commit simply increases the timeout in setTimeout to avoid such situations

Current behavior before PR:

Random rare annoying falsy negative results in tour tests in travis

Desired behavior after PR is merged:

Get rid of falsy negative results in CI tests

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@it-projects-llc

Forward-Port-Of: #40049

The simplified version of run method looks like this:

run: function(){
this.pause();
setTimeout(function(){
this.play();
}, 0)
window.location.href = tour.url;
}

That is, if page is not reloaded, the tour starts immediately. Unfortunately, in rare cases, the method in setTimeout is executed earlier than reloading happens. It brokes the whole tour. For example:

* phantom_js/browse_js (in python) opens "/web"
* odoo updates "/web" to "/web#action=123&...."
* method run (in js) starts loading "/web"
* few steps are executed before the reloading, e.g. step "Open Point Of Sale menu"
* headless browser reloads page back to "/web"
* tour system cannot execute next step, because we are not in Point Of Sale men
* tour system raise error

This commit simply increases the timeout in setTimeout to avoid such situations

X-original-commit: f53be0a
@robodoo robodoo added forwardport This PR was created by @fw-bot seen 🙂 labels Sep 7, 2020
@fw-bot
Copy link
Contributor Author

fw-bot commented Sep 7, 2020

This PR targets saas-11.3 and is part of the forward-port chain. Further PRs will be created up to saas-12.3.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@C3POdoo C3POdoo added the RD research & development, internal work label Sep 7, 2020
@robodoo robodoo added ☑ ci/template CI 🤖 Robodoo has seen passing statuses and removed ☐ ci/template labels Sep 7, 2020
@fw-bot
Copy link
Contributor Author

fw-bot commented Sep 7, 2020

Ping @yelizariev, @d-fence
The next pull request (#57150) is in conflict. You can merge the chain up to here by saying

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@d-fence
Copy link
Contributor

d-fence commented Sep 7, 2020

@fw-bot r+

@robodoo robodoo added the r+ 👌 label Sep 7, 2020
robodoo pushed a commit that referenced this pull request Sep 7, 2020
The simplified version of run method looks like this:

run: function(){
this.pause();
setTimeout(function(){
this.play();
}, 0)
window.location.href = tour.url;
}

That is, if page is not reloaded, the tour starts immediately. Unfortunately, in rare cases, the method in setTimeout is executed earlier than reloading happens. It brokes the whole tour. For example:

* phantom_js/browse_js (in python) opens "/web"
* odoo updates "/web" to "/web#action=123&...."
* method run (in js) starts loading "/web"
* few steps are executed before the reloading, e.g. step "Open Point Of Sale menu"
* headless browser reloads page back to "/web"
* tour system cannot execute next step, because we are not in Point Of Sale men
* tour system raise error

This commit simply increases the timeout in setTimeout to avoid such situations

closes #57145

X-original-commit: f53be0a
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
@robodoo robodoo closed this Sep 7, 2020
@robodoo robodoo temporarily deployed to merge September 7, 2020 14:10 Inactive
@d-fence d-fence deleted the saas-11.3-patch-23-W4x0-fw branch September 7, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants