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

BUG: xfailed v3 unit test for sending e-mail #1634

Open
3 tasks
kalbfled opened this issue Feb 6, 2024 · 1 comment
Open
3 tasks

BUG: xfailed v3 unit test for sending e-mail #1634

kalbfled opened this issue Feb 6, 2024 · 1 comment

Comments

@kalbfled
Copy link
Member

kalbfled commented Feb 6, 2024

Description

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

The file app/celery/v3/notification_tasks.py contains this snippet around line 191:

    # Persist the notification so related model instances are available to downstream code.
    notification.status = NOTIFICATION_CREATED
    db.session.add(notification)
    # TODO - Is this necessary?  The template isn't being modified.  Refreshing fails.
    db.session.add(template)
    db.session.commit()

Not commenting-out db.session.add(template) results in the failure of unit test tests/app/celery/v3/test_notification_tasks.py::test_v3_send_email_notification. However, commenting-out and removing that line results in e-mails not actually sending (as identified by a failing regression test).

This ticket is to resolve this disparity.

Steps to Reproduce

  1. Comment and uncomment as described above. Run unit and regression tests.

Impact/Urgency

V3 email is impacted - either the unit test fails or the actual email send fails

Expected Behavior

  • All unit tests pass without unnecessary or undesired x-fails.
  • v3 send e-mail works (regression suite verifies this)

Additional Info & Resources

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

No branches or pull requests

4 participants