-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
The kernel_gateway (and, by extension the new enterprise_gateway incubator) tests now encounter a test failure which is specifically looking for the NoSuchKernel exception in the returned json body.
The test issues a start kernel request sans the kernel name, after setting the default kernel name to a bogus value (fake-kernel) and expects an exception - knowing that fake-kernel doesn't exist, which then confirms that the default kernel is being used. However, after 5.2.0 has been available, all build tests get this single failure. I then used some targeted searches and pulled various commits to see where the breakage occurs and found that the commits in PR #2853 lead to the issue.
Unfortunately, I'm not certain how callers are supposed to address this issue since I'm not familiar enough with tornado handlers.
Here's the command to reproduce the issue from JKG: nosetests --nocapture --cover-package=kernel_gateway kernel_gateway.tests.test_jupyter_websocket.TestCustomDefaultKernel
and output...
F
======================================================================
FAIL: The default kernel name should be used on empty requests.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/site-packages/tornado/testing.py", line 529, in post_coroutine
timeout=timeout)
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/site-packages/tornado/ioloop.py", line 458, in run_sync
return future_cell[0].result()
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/site-packages/tornado/gen.py", line 1069, in run
yielded = self.gen.send(value)
File "/opt/anaconda/envs/enterprise-gateway-dev/lib/python3.6/types.py", line 182, in send
return self.__wrapped.send(val)
File "/Users/kbates/repos/oss/jupyter/kernel_gateway/kernel_gateway/tests/test_jupyter_websocket.py", line 574, in test_default_kernel_name
self.assertTrue('raise NoSuchKernel' in str(response.body))
AssertionError: False is not true
----------------------------------------------------------------------
Ran 1 test in 0.213s
FAILED (failures=1)
I added a print statement into the corresponding enterprise_gateway test to see the actual response body. response.body: b'{"reason": "Internal Server Error", "message": ""}' when a fairly rich stack trace has been previously included.