Edgewall Software

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11443 closed enhancement (fixed)

Remove unnecessary web server restarts in functional test cases

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: general Version:
Severity: normal Keywords: functional tests
Cc: Branch:
Release Notes:

Reduced execution time of functional tests by removing unnecessary web server restarts.

API Changes:
Internal Changes:


There are numerous calls to FunctionalTestEnvironment.restart that seem to be unnecessary. I'm not sure why they were needed, but the issue may have been fixed with [12258].

The proposed changes reduce the execution time on my machine from 170-180 seconds to < 150 seconds.

Proposed changes in log:rjollos.git:t11443. Tested on Ubuntu 13.04. Please test execution on additional platforms if you can.

For reference the result of test execution on 1.0-stable at r12430 is:

$ PYTHONPATH=. python -m trac.test
Ran 1647 tests in 270.404s

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 10 years ago

Status: newassigned

comment:2 by Ryan J Ollos, 10 years ago

A few more changes:

  • In the call to unittest.makeSuite, test is the default prefix so it doesn't need to be specified (at least for Python 2.5-2.7):
    Help on function makeSuite in module unittest.loader:
    makeSuite(testCaseClass, prefix='test', sortUsing=<built-in function cmp>, suiteClass=<class 'unittest.suite.TestSuite'>)
  • Consistent calls to unittest.main in each test case module.

comment:3 by Jun Omae, 10 years ago

Results of functional tests with the following environments:

log:rjollos.git:t11443 1.0-stable r12440
CentOS 5 with ext3 Python 2.5 1068.505s 1115.442s
CentOS 6 with ext4 Python 2.6 314.240s 462.444s
Windows XP sp3 Python 2.5 547.047s 567.766s

comment:4 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Thanks for testing!

Committed to 1.0-stable in [12448] and merged to trunk in [12449].

comment:5 by Ryan J Ollos, 10 years ago

Removed two more instances of default prefix in [12791], merged in [12792].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.