You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a problem, that any of my tests in parametrize not get in mailoutbox enough messages that were sent by .delay as celery tasks. So, I should do at least time.sleep(1) to get remaining messages to mailoutbox before checking its lenght. Can I prevent it?
Maybe it's connected with #1054 but I am not sure.
By the way, I am using now in conftest.py to prevent using of django_db(transaction=True), but I am not sure that it will work stably. Like in this case.
@pytest.fixture(scope="session")
def celery_worker_parameters():
from celery.fixups.django import DjangoWorkerFixup
DjangoWorkerFixup.install = lambda x: None
# This needed, because there is error InterfaceError: connection already closed
# https://stackoverflow.com/questions/71472478/celery-worker-fixture-in-pytest-connection-already-closed-error
return {"without_heartbeat": False}
The text was updated successfully, but these errors were encountered:
I found a problem, that any of my tests in parametrize not get in mailoutbox enough messages that were sent by .delay as celery tasks. So, I should do at least time.sleep(1) to get remaining messages to mailoutbox before checking its lenght. Can I prevent it?
Maybe it's connected with #1054 but I am not sure.
By the way, I am using now in
conftest.py
to prevent using ofdjango_db(transaction=True)
, but I am not sure that it will work stably. Like in this case.The text was updated successfully, but these errors were encountered: