Skip to content

Instantly share code, notes, and snippets.

@r4nd0mbr1ck
Last active November 4, 2017 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r4nd0mbr1ck/0ae4b85d3c05eeb2eaea98ce21d18f99 to your computer and use it in GitHub Desktop.
Save r4nd0mbr1ck/0ae4b85d3c05eeb2eaea98ce21d18f99 to your computer and use it in GitHub Desktop.
test error
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― test_request_sync_service[pyloop] ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
aioclient_mock = <tests.test_util.aiohttp.AiohttpClientMocker object at 0x7fb4e0ec4b38>, hass = <homeassistant.core.HomeAssistant object at 0x7fb4e8746a20>
@asyncio.coroutine
def test_request_sync_service(aioclient_mock, hass):
"""Test that it posts to the request_sync url."""
aioclient_mock.post(
ga.const.REQUEST_SYNC_BASE_URL, status=200)
yield from async_setup_component(hass, 'google_assistant', {
'google_assistant': {
'project_id': 'test_project',
'client_id': 'r7328kwdsdfsdf03223409',
'access_token': '8wdsfjsf932492342349234',
'agent_user_id': GA_AGENT_USER_ID,
'api_key': GA_API_KEY
}})
> hass.services.call(ga.const.DOMAIN, ga.const.SERVICE_REQUEST_SYNC)
tests/components/google_assistant/test_init.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
homeassistant/core.py:941: in call
self._hass.loop
/usr/lib/python3.5/concurrent/futures/_base.py:400: in result
self._condition.wait(timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Condition(<unlocked _thread.RLock object owner=0 count=0 at 0x7fb4e4a6dae0>, 0)>, timeout = None
def wait(self, timeout=None):
"""Wait until notified or until a timeout occurs.
If the calling thread has not acquired the lock when this method is
called, a RuntimeError is raised.
This method releases the underlying lock, and then blocks until it is
awakened by a notify() or notify_all() call for the same condition
variable in another thread, or until the optional timeout occurs. Once
awakened or timed out, it re-acquires the lock and returns.
When the timeout argument is present and not None, it should be a
floating point number specifying a timeout for the operation in seconds
(or fractions thereof).
When the underlying lock is an RLock, it is not released using its
release() method, since this may not actually unlock the lock when it
was acquired multiple times recursively. Instead, an internal interface
of the RLock class is used, which really unlocks it even when it has
been recursively acquired several times. Another internal interface is
then used to restore the recursion level when the lock is reacquired.
"""
if not self._is_owned():
raise RuntimeError("cannot wait on un-acquired lock")
waiter = _allocate_lock()
waiter.acquire()
self._waiters.append(waiter)
saved_state = self._release_save()
gotit = False
try: # restore state no matter what (e.g., KeyboardInterrupt)
if timeout is None:
> waiter.acquire()
E Failed: Timeout >30.0s
/usr/lib/python3.5/threading.py:293: Failed
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
DEBUG:asyncio:Using selector: EpollSelector
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
selector_events.py 53 DEBUG Using selector: EpollSelector
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
INFO:homeassistant.loader:Loaded google_assistant from homeassistant.components.google_assistant
INFO:homeassistant.loader:Loaded http from homeassistant.components.http
INFO:homeassistant.setup:Setting up http
INFO:homeassistant.setup:Setup of domain http took 0.0 seconds.
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=http>
INFO:homeassistant.setup:Setting up google_assistant
INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=google_assistant, service=request_sync>
INFO:homeassistant.setup:Setup of domain google_assistant took 0.0 seconds.
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=google_assistant>
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
~~~~~~~~~~~~~~~~~~~~~ Stack of Thread-2 (140414761826048) ~~~~~~~~~~~~~~~~~~~~~~
File "/usr/lib/python3.5/threading.py", line 882, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 64, in _worker
work_item = work_queue.get(block=True)
File "/usr/lib/python3.5/queue.py", line 164, in get
self.not_empty.wait()
File "/usr/lib/python3.5/threading.py", line 293, in wait
waiter.acquire()
~~~~~~~~~~~~~~~~~~~~~ Stack of Thread-1 (140414844327680) ~~~~~~~~~~~~~~~~~~~~~~
File "/usr/lib/python3.5/threading.py", line 882, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 64, in _worker
work_item = work_queue.get(block=True)
File "/usr/lib/python3.5/queue.py", line 164, in get
self.not_empty.wait()
File "/usr/lib/python3.5/threading.py", line 293, in wait
waiter.acquire()
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
loader.py 155 INFO Loaded google_assistant from homeassistant.components.google_assistant
loader.py 155 INFO Loaded http from homeassistant.components.http
setup.py 184 INFO Setting up http
setup.py 202 INFO Setup of domain http took 0.0 seconds.
core.py 404 INFO Bus:Handling <Event component_loaded[L]: component=http>
setup.py 184 INFO Setting up google_assistant
core.py 404 INFO Bus:Handling <Event service_registered[L]: domain=google_assistant, service=request_sync>
setup.py 202 INFO Setup of domain google_assistant took 0.0 seconds.
core.py 404 INFO Bus:Handling <Event component_loaded[L]: component=google_assistant>
tests/components/google_assistant/test_init.py ⨯ 100% ██████████
======================================================================== slowest 10 test durations =========================================================================
30.00s call tests/components/google_assistant/test_init.py::test_request_sync_service[pyloop]
0.07s teardown tests/components/google_assistant/test_init.py::test_request_sync_service[pyloop]
0.04s setup tests/components/google_assistant/test_init.py::test_request_sync_service[pyloop]
Results (33.84s):
1 failed
- tests/components/google_assistant/test_init.py:11 test_request_sync_service[pyloop]
ERROR: InvocationError: '/opt/foss/home-assistant/.tox/py35/bin/py.test --timeout=30 --duration=10 --cov --cov-report= tests/components/google_assistant/test_init.py'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment