[tor-bugs] #27053 [Core Tor/Stem]: Check controller's event error handling

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Aug 12 22:53:20 UTC 2018


#27053: Check controller's event error handling
---------------------------+--------------------------
 Reporter:  atagar         |          Owner:  atagar
     Type:  defect         |         Status:  reopened
 Priority:  Very High      |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Major          |     Resolution:
 Keywords:  controller     |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+--------------------------

Comment (by dmr):

 Replying to [comment:11 atagar]:
 > As for the unit test failures I have a theory. When we run all our tests
 'run_tests.py --all' it performs our heaviest integ tests asynchronously
 along with our unit tests to speed things up. This tends to peg the CPU,
 possibly enough for the bumped sleep to still not be enough. Sleeping like
 that was a lazy hack anyway so replaced it with something better.
 >
 > https://gitweb.torproject.org/stem.git/commit/?id=c9cc0f5
 >
 > Does that do the trick?

 Still seeing unit-test failures. :(
 `tox -- -a` again.

 py27:
 {{{
 ======================================================================
 FAIL: test_event_listing_with_error
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/path/to/.tox/py27/local/lib/python2.7/site-
 packages/mock/mock.py", line 1305, in patched
     return func(*args, **keywargs)
   File "/path/to/test/unit/control/controller.py", line 663, in
 test_event_listing_with_error
     self.circ_listener.assert_called_once_with(CIRC_EVENT)
   File "/path/to/.tox/py27/local/lib/python2.7/site-
 packages/mock/mock.py", line 947, in assert_called_once_with
     raise AssertionError(msg)
 AssertionError: Expected 'mock' to be called once. Called 0 times.

 ----------------------------------------------------------------------
 Ran 33 tests in 0.308s

 FAILED (failures=1)
 }}}

 py35:
 {{{
 ======================================================================
 ERROR: test_event_listing_with_malformed_event
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib/python3.5/unittest/mock.py", line 1159, in patched
     return func(*args, **keywargs)
   File "/path/to/test/unit/control/controller.py", line 688, in
 test_event_listing_with_malformed_event
     self.malformed_listener.assert_called_once()
   File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
     raise AttributeError(name)
 AttributeError: assert_called_once

 ----------------------------------------------------------------------
 Ran 33 tests in 0.327s

 FAILED (errors=1)
 }}}

 Note that these are different tests!

 > Thanks Dave. Yup, you're right, this caused the lingering thread
 regression. Fixed.
 >
 > https://gitweb.torproject.org/stem.git/commit/?id=bc06836

 On the plus side, it does look like the lingering threads are gone for me!
 :)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27053#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list