Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 18 years ago

#1328 closed defect (fixed)

trac-admin Unit Tests are very slow in trunk

Reported by: Mark Rowe <edgewall.com@…> Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: admin/console Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (1)

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

Download all attachments as: .zip

Change History (5)

by Mark Rowe <edgewall.com@…>, 20 years ago

Attachment: trac-admin-modularity.patch added

Minor refactoring of trac-admin

comment:1 by Mark Rowe <edgewall.com@…>, 20 years ago

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.

comment:2 by Mark Rowe <edgewall.com@…>, 20 years ago

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

comment:3 by Christopher Lenz, 20 years ago

Milestone: 0.9
Owner: changed from daniel to Christopher Lenz
Status: newassigned

comment:4 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in [1379].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.