Edgewall Software

Ticket #1328 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

trac-admin Unit Tests are very slow in trunk

Reported by: Mark Rowe <edgewall.com@…> Owned by: cmlenz
Priority: normal Milestone: 0.9
Component: admin/console Version: devel
Severity: minor Keywords:
Cc:

Description

As the unit tests for trac-admin in trunk execute trac-admin and parse its output for each test, they are very slow. On my machine it takes around 75 seconds for all 154 tests to complete. This can be improved by moving the functionality of trac-admin into a module, which the unit tests can then work with. Patch forthcoming.

Attachments

trac-admin-modularity.patch (86.5 kB) - added by Mark Rowe <edgewall.com@…> 4 years ago.
Minor refactoring of trac-admin

Change History

Changed 4 years ago by Mark Rowe <edgewall.com@…>

Minor refactoring of trac-admin

Changed 4 years ago by Mark Rowe <edgewall.com@…>

The above patch looks a lot bigger than it really is. The core functionality of trac-admin is moved into a new trac.scripts.admin module. trac-admin is replaced with a three-line script that runs the core code. The unit test now instantiates a TracAdmin object and invokes it's docmd method repeatedly rather than using os.system to execute a new trac-admin instance per command.

Changed 4 years ago by Mark Rowe <edgewall.com@…>

Oh, I should mention that this patch drops total execution time down to around 14 seconds for the 154 tests.

Changed 4 years ago by cmlenz

  • owner changed from daniel to cmlenz
  • status changed from new to assigned
  • milestone set to 0.9

Changed 4 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Patch applied in [1379].

Add/Change #1328 (trac-admin Unit Tests are very slow in trunk)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.