Closed
Description
I wanted to package version 0.5.2 for Fedora, but test_broadcast fails. Help to debug that would be appreciated.
______________________________________ test_broadcast ___________________________________
vim = <pynvim.api.nvim.Nvim object at 0x7f0488a73350>
def test_broadcast(vim: Nvim) -> None:
vim.command('call rpcnotify(0, "event1", 1, 2, 3)')
vim.command('call rpcnotify(0, "event2", 4, 5, 6)')
vim.command('call rpcnotify(0, "event2", 7, 8, 9)')
> event = vim.next_message()
test/test_events.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pynvim/api/nvim.py:220: in next_message
msg = self._session.next_message()
pynvim/msgpack_rpc/session.py:99: in next_message
self._async_session.run(self._enqueue_request_and_stop,
pynvim/msgpack_rpc/async_session.py:73: in run
self._msgpack_stream.run(self._on_message)
pynvim/msgpack_rpc/msgpack_stream.py:43: in run
self.loop.run(self._on_data)
pynvim/msgpack_rpc/event_loop/base.py:190: in run
self._run()
pynvim/msgpack_rpc/event_loop/asyncio.py:259: in _run
self._loop.run_forever()
/usr/lib64/python3.12/asyncio/base_events.py:640: in run_forever
self._run_once()
/usr/lib64/python3.12/asyncio/base_events.py:1954: in _run_once
event_list = self._selector.select(timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selectors.EpollSelector object at 0x7f0488a735c0>, timeout = -1
def select(self, timeout=None):
if timeout is None:
timeout = -1
elif timeout <= 0:
timeout = 0
else:
# epoll_wait() has a resolution of 1 millisecond, round away
# from zero to wait *at least* timeout seconds.
timeout = math.ceil(timeout * 1e3) * 1e-3
# epoll_wait() expects `maxevents` to be greater than zero;
# we want to make sure that `select()` can be called when no
# FD is registered.
max_ev = max(len(self._fd_to_key), 1)
ready = []
try:
> fd_event_list = self._selector.poll(timeout, max_ev)
E Failed: Timeout >5.0s
/usr/lib64/python3.12/selectors.py:468: Failed
====================================short test summary info =====================================
FAILED test/test_events.py::test_broadcast - Failed: Timeout >5.0s