Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock out _turn_deque on MagicFolders during tests #191

Conversation

meejah
Copy link
Contributor

@meejah meejah commented Oct 2, 2015

Instead of using a Clock instance to drive the tests forward faster, we mock out the _turn_deque calls in MagicFolder and use the originals to drive forward the download/upload queue as required by the tests.

Curious what you think of this approach? (And: why don't we need a ._bob_download() where the XXX comment is?) Tests go from ~70s to ~7s on my machine.

Instead of using a Clock instance to drive the tests
forward faster, we mock out the _turn_deque calls in
MagicFolder and use the originals to drive forward the
download/upload queue as required by the tests.

Conflicts:
	src/allmydata/test/test_magic_folder.py
@daira
Copy link
Member

daira commented Oct 4, 2015

Reviewing.

@daira daira assigned daira and unassigned daira Oct 4, 2015
@daira
Copy link
Member

daira commented Oct 5, 2015

-1

@daira daira closed this Oct 5, 2015
@meejah meejah deleted the 2500.fast-clock-mock-turn-deque.0 branch October 7, 2015 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants