Skip to content

Does ChannelsLiveServerTestCase support running test in parallel? #1843

@qiu-lijie

Description

@qiu-lijie

Does ChannelsLiveServerTestCase support running test in parallel?

I'm writing some test using ChannelsLiveServerTestCase, but when ran with the --parallel option, I get the following error

Traceback (most recent call last):
  File "/home/qiu_lijie/.local/lib/python3.8/site-packages/django/test/testcases.py", line 287, in _setup_and_call
    self._pre_setup()
  File "/home/qiu_lijie/.local/lib/python3.8/site-packages/channels/testing/live.py", line 52, in _pre_setup
    self._server_process.start()
  File "/usr/local/lib/python3.8/multiprocessing/process.py", line 118, in start
    assert not _current_process._config.get('daemon'), \
AssertionError: daemonic processes are not allowed to have children

After a bit of digging, it SEEMS like just monkey patching out the assertion check in multiprocessing allows tests to run w/o adverse affect, but I want to confirm whether this is a known issue/intended result. I can't seem to find any mention of ChannelsLiveServerTestCase cannot be run in parallel in the documentation, and it seems necessary given the fact that selenium/end to end tests run much slower.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions