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

crm_salesperson_planner: flaky test #589

Closed
yajo opened this issue Jul 25, 2024 · 1 comment · Fixed by #590
Closed

crm_salesperson_planner: flaky test #589

yajo opened this issue Jul 25, 2024 · 1 comment · Fixed by #590
Assignees
Labels
Milestone

Comments

@yajo
Copy link
Member

yajo commented Jul 25, 2024

Module

crm_salesperson_planner

Describe the bug

The module tests started failing recently with:

2024-07-23 09:48:39,728 315 INFO odoo odoo.addons.crm_salesperson_planner.tests.test_crm_salesperson_planner_visit_template: Starting TestCrmSalespersonPlannerVisitTemplate.test_05_repeat_weeks ... 
2024-07-23 09:48:39,735 315 INFO odoo odoo.addons.crm_salesperson_planner.tests.test_crm_salesperson_planner_visit_template: ====================================================================== 
2024-07-23 09:48:39,735 315 ERROR odoo odoo.addons.crm_salesperson_planner.tests.test_crm_salesperson_planner_visit_template: ERROR: TestCrmSalespersonPlannerVisitTemplate.test_05_repeat_weeks
Traceback (most recent call last):
  File "/__w/crm/crm/crm_salesperson_planner/tests/test_crm_salesperson_planner_visit_template.py", line 214, in test_05_repeat_weeks
    create_item.create_visits()
  File "/__w/crm/crm/crm_salesperson_planner/wizards/crm_salesperson_planner_visit_template_create.py", line 31, in create_visits
    raise ValidationError(_("The date can't be earlier than today"))
odoo.exceptions.ValidationError: The date can't be earlier than today

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:
Just see the flaky test in action in https://github.com/OCA/crm/actions/runs/10056645027/job/27795901288?pr=577 (for #577).

Expected behavior
Test without false negatives.

Additional context
Check guide to avoid date-sensitive flaky tests: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#avoid-dynamic-dates

We don't use the module personally but it's blocking our PRs. The flaky test was added in #559. Could you please take a look @victoralmau? Thanks!

@yajo
Copy link
Member Author

yajo commented Jul 29, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants