Opened 4 months ago

Closed 7 weeks ago

#27173 closed defect (fixed)

Unstable unit tests in control.controller

Reported by: dmr Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords: controller testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

#27053 brought about some changes to stem's controller's event handling.

Unfortunately the tests for that are a bit unstable - sometimes failing.
Instead of letting that ticket drag on, the work is being moved to a new ticket for better clarity.

The history behind that is mostly in #27053, so refer there.
A few parts were discussed over IRC, however, so that context will be filled in below...

From 27053#comment:14

[...] The good news is that I figured out the python3 mock issue you found. Turns out there's a difference between PyPI and Python3's mock modules. Fixed...

https://gitweb.torproject.org/stem.git/commit/?id=e75cf25

I confirmed that this works for me.

From 27053#comment:15 (the latest comment at time of writing):

Hi Dave, think I got it but tough to be sure. Does this do the trick for you?

https://gitweb.torproject.org/stem.git/commit/?id=abc6f29

Tests are still failing as of this revision, still giving AssertionError: Expected 'mock' to be called once. Called 0 times. for py27.
It seems to be more stable, now failing at ~5-10% rate instead of 25-40%. (Rate not scientific)

Child Tickets

Change History (1)

comment:1 Changed 7 weeks ago by atagar

Resolution: fixed
Status: newclosed

Ick, this took me quite a while to puzzle out. Pushed something that should fix this, feel free to reopen if this corps back up.

https://gitweb.torproject.org/stem.git/commit/?id=5bd8a10

Note: See TracTickets for help on using tickets.