我正在尝试使用nose2-3 运行锯齿xo tp 单元测试,但代码挂起。当我 Ctrl-C 退出时,将显示以下内容。基本上,TP 测试用例调用注册模拟验证器,并且该调用永远不会返回,因为 ZMQ 轮询器正在等待某些东西。
我在 Ubutnu 16 LTS 上使用 Python 3.5.2 并在上周使用 hyperledger/sawtooth-core 重新设置了基础,因此我正在使用最新代码运行简单的配置。
我在这里做错了什么?
谢谢。
envoy:~/git/sawtooth-core/sdk/examples/xo_python$ nose2-3 tests.test_tp_xo
^C
----------------------------------------------------------------------
Ran 0 tests in 2.608s
OK
Traceback (most recent call last):
File "/usr/bin/nose2-3", line 9, in <module>
load_entry_point('nose2==0.6.4', 'console_scripts', 'nose2')()
File "/usr/lib/python3/dist-packages/nose2/main.py", line 306, in discover
return main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/nose2/main.py", line 100, in __init__
super(PluggableTestProgram, self).__init__(**kw)
File "/usr/lib/python3.5/unittest/main.py", line 94, in __init__
self.runTests()
File "/usr/lib/python3/dist-packages/nose2/main.py", line 271, in runTests
self.result = runner.run(self.test)
File "/usr/lib/python3/dist-packages/nose2/runner.py", line 53, in run
executor(test, result)
File "/usr/lib/python3/dist-packages/nose2/runner.py", line 41, in <lambda>
executor = lambda suite, result: suite(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 122, in run
test(result)
File "/usr/lib/python3.5/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python3.5/unittest/suite.py", line 114, in run
self._handleClassSetUp(test, result)
File "/usr/lib/python3.5/unittest/suite.py", line 163, in _handleClassSetUp
setUpClass()
File "/project/git/sawtooth-core/sdk/examples/xo_python/tests/test_tp_xo.py", line 29, in setUpClass
super().setUpClass()
File "/usr/lib/python3/dist-packages/sawtooth_processor_test/transaction_processor_test_case.py", line 31, in setUpClass
if not cls.validator.register_processor():
File "/usr/lib/python3/dist-packages/sawtooth_processor_test/mock_validator.py", line 128, in register_processor
message, ident = self.receive()
File "/usr/lib/python3/dist-packages/sawtooth_processor_test/mock_validator.py", line 187, in receive
self._receive()
File "/usr/lib/python3.5/asyncio/base_events.py", line 375, in run_until_complete
self.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 345, in run_forever
self._run_once()
File "/usr/lib/python3.5/asyncio/base_events.py", line 1276, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3/dist-packages/zmq/asyncio.py", line 232, in select
fd_event_list = self._zmq_poller.poll(timeout)
File "/usr/lib/python3/dist-packages/zmq/sugar/poll.py", line 99, in poll
return zmq_poll(self.sockets, timeout=timeout)
File "zmq/backend/cython/_poll.pyx", line 115, in zmq.backend.cython._poll.zmq_poll (zmq/backend/cython/_poll.c:1705)
File "zmq/backend/cython/checkrc.pxd", line 12, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/_poll.c:2084)
KeyboardInterrupt