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

Fixed async tests #22

Merged
merged 8 commits into from
Oct 5, 2018
Merged

Fixed async tests #22

merged 8 commits into from
Oct 5, 2018

Conversation

maciej-gol
Copy link
Owner

@maciej-gol maciej-gol commented Oct 5, 2018

Fixes #20

@maciej-gol maciej-gol merged commit d205fcd into master Oct 5, 2018
@maciej-gol maciej-gol deleted the fixed-async-tests branch October 5, 2018 21:36
@softinio
Copy link

softinio commented Oct 5, 2018

Thanks for this appreciate it

@softinio
Copy link

softinio commented Oct 8, 2018

@maciej-gol how do you run your new tests?

@maciej-gol
Copy link
Owner Author

maciej-gol commented Oct 9, 2018 via email

@softinio
Copy link

softinio commented Oct 9, 2018

I get this when I do that any suggestions:

https://via.softinio.com/Screen-Shot-2018-10-09-13-35-52.png

@maciej-gol
Copy link
Owner Author

maciej-gol commented Oct 9, 2018 via email

@softinio
Copy link

softinio commented Oct 9, 2018

I did that and got:

[2018-10-09 21:05:27,034: INFO/MainProcess] [email protected] ready.
[2018-10-09 21:05:28,639: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[ee7c993f-3dbf-4556-af1d-27066e0e697e]
[2018-10-09 21:05:28,719: ERROR/ForkPoolWorker-8] Task tenant_schemas_celery.test_tasks.update_task[ee7c993f-3dbf-4556-af1d-27066e0e697e] raised unexpected: DoesNotExist()
Traceback (most recent call last):
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 15, in update_task
    dummy = DummyModel.objects.get(pk=model_id)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/query.py", line 387, in get
    self.model._meta.object_name
test_app.tenant.models.DoesNotExist: DummyModel matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 18, in update_task
    raise DoesNotExist()
tenant_schemas_celery.test_tasks.DoesNotExist
[2018-10-09 21:05:28,777: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[d2442a87-4f13-4b51-9faa-c708ca6d1c82]
[2018-10-09 21:05:28,864: ERROR/ForkPoolWorker-2] Task tenant_schemas_celery.test_tasks.update_task[d2442a87-4f13-4b51-9faa-c708ca6d1c82] raised unexpected: DoesNotExist()
Traceback (most recent call last):
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 15, in update_task
    dummy = DummyModel.objects.get(pk=model_id)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/query.py", line 387, in get
    self.model._meta.object_name
test_app.tenant.models.DoesNotExist: DummyModel matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 18, in update_task
    raise DoesNotExist()
tenant_schemas_celery.test_tasks.DoesNotExist
[2018-10-09 21:05:28,870: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[f6ca56bd-01c9-4b7d-97df-407789379929]
[2018-10-09 21:05:28,976: INFO/ForkPoolWorker-4] Task tenant_schemas_celery.test_tasks.update_task[f6ca56bd-01c9-4b7d-97df-407789379929] succeeded in 0.1042454260023078s: None
.[2018-10-09 21:05:29,131: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_retry_task[610a014c-3e1a-42cc-915b-eb6e1653faf5]
[2018-10-09 21:05:29,209: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_retry_task[610a014c-3e1a-42cc-915b-eb6e1653faf5]  ETA:[2018-10-09 21:05:29.291796+00:00]
[2018-10-09 21:05:29,211: INFO/ForkPoolWorker-6] Task tenant_schemas_celery.test_tasks.update_retry_task[610a014c-3e1a-42cc-915b-eb6e1653faf5] retry: Retry in 0.1s
[2018-10-09 21:05:31,062: INFO/ForkPoolWorker-8] Task tenant_schemas_celery.test_tasks.update_retry_task[610a014c-3e1a-42cc-915b-eb6e1653faf5] succeeded in 0.03211822199227754s: None
.[2018-10-09 21:05:31,132: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[823360bd-555d-42c0-81c0-1ad2df5c141c]
[2018-10-09 21:05:31,181: INFO/ForkPoolWorker-2] Task tenant_schemas_celery.test_tasks.update_task[823360bd-555d-42c0-81c0-1ad2df5c141c] succeeded in 0.04838212201138958s: None
[2018-10-09 21:05:31,185: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[2dfab23c-bb84-4be0-b76d-13fa58f583f5]
[2018-10-09 21:05:31,220: INFO/ForkPoolWorker-4] Task tenant_schemas_celery.test_tasks.update_task[2dfab23c-bb84-4be0-b76d-13fa58f583f5] succeeded in 0.03493194699694868s: None
[2018-10-09 21:05:31,228: INFO/MainProcess] Received task: tenant_schemas_celery.test_tasks.update_task[223b052d-e985-4288-a395-0b0391065f7f]
[2018-10-09 21:05:31,250: ERROR/ForkPoolWorker-6] Task tenant_schemas_celery.test_tasks.update_task[223b052d-e985-4288-a395-0b0391065f7f] raised unexpected: DoesNotExist()
Traceback (most recent call last):
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 15, in update_task
    dummy = DummyModel.objects.get(pk=model_id)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/django/db/models/query.py", line 387, in get
    self.model._meta.object_name
test_app.tenant.models.DoesNotExist: DummyModel matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/srahmanian/.pyenv/versions/3.6.6/envs/tsc/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/srahmanian/experiments/tenant-schemas-celery/tenant_schemas_celery/test_tasks.py", line 18, in update_task
    raise DoesNotExist()
tenant_schemas_celery.test_tasks.DoesNotExist

weird !

@maciej-gol
Copy link
Owner Author

maciej-gol commented Oct 9, 2018 via email

@softinio
Copy link

softinio commented Oct 9, 2018

Oh got it I didn't notice they had passed but they had. Thanks again dude.

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

Successfully merging this pull request may close these issues.

2 participants