Open Alexander3 opened 5 years ago
I also have this problem. I'm trying to write a test and it seems to hang forever with a (seemingly) harmless GraphQL query.
{
emailLists {
name
}
}
If I skip the None
bit here and change the code instead, the test will complete but it is not quite right (unsurprisingly).
Promise.resolve(promise_executor).catch(on_rejected).then(on_resolve)
E AssertionError: assert {'data': <fun...7f6fc0253488>} == {'data': {'hey': 'hello!'}}
E Differing items:
E {'data': <function execute.<locals>.promise_executor at 0x7f6fc0253488>} != {'data': {'hey': 'hello!'}}
E Use -v to get the full diff
Naturally, ignore the 'hey': 'hello!'
bit as I'm just copy/pasting from the example directly right now.
I have the same issue, the execution just hang in the promise.get()
line, I have tried to fork and debug the issue, and found in fact, we can set the timeout for promise.get(timeout=5)
, so the execution will not hang there.
If BaseExcetion will occur during query execution everything hangs. I've tried different executors, but this doesn't help. I used
SystemExit
in example for brevity. My real situation was pytest-django throwing exception when you try to access database.Example code
My debugger shows that it's freezed on this line. Inside
get
promise callswait()
and waits forever. https://github.com/graphql-python/graphql-core/blob/master/graphql/execution/executor.py#L147Full traceback
``` File "/home/bond/.PyCharm2018.3/config/scratches/scratch_4.py", line 26, inSolution
Looks like it should be caught here: https://github.com/graphql-python/graphql-core/blob/master/graphql/execution/executors/utils.py#L20 https://github.com/graphql-python/graphql-core/blob/master/graphql/execution/executor.py#L448 Am I right?