Opened 4 years ago

Closed 2 years ago

#14356 closed enhancement (implemented)

Pre-test activities to speed integ tests

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

Description

Random idea I just had - for integ tests that take a long time due to long-running external activities (like the process tests which spawn and stop tor processes) we can kick off an asynchronous tasks that preps those tests as we run others.

That is to say, these modules could have a pretest() function with spawns a thread that does the long-running operations. Then when the test executes it joins on the thread and makes its assertions. This would hide the long-running parts, greatly speeding up some of our tests.

Child Tickets

Change History (2)

comment:1 Changed 4 years ago by atagar

Keywords: easy removed

I pushed a commit that does this to the pretest_activity branch of my repository...

https://gitweb.torproject.org/user/atagar/stem.git/commit/?h=pretest_activity&id=25e4b0e40f4b245525b26f3085bd8d5a373cc2f2

As discussed in the commit it's actually causing our tests to be slower overall. Frustrating. >:(

Patch welcome if someone finds a way to speed things up.

comment:2 Changed 2 years ago by atagar

Resolution: implemented
Severity: Normal
Status: newclosed

Finally had success on this front: https://gitweb.torproject.org/stem.git/commit/?id=3fc6234

I might use this trick elsewhere too, but static checks were the best candidate for this.

Note: See TracTickets for help on using tickets.