Ticket #9894 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Slow Unit Tests for Vickie Lynch

Reported by: Owen Arnold Owned by: Vickie Lynch
Priority: major Milestone: Release 3.3
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #9905 Tester: Owen Arnold

Description

Cloned from #9893:


We have a number of slow running unit tests which we need to fix as part of the 3.3 maintenance window. We are targeting test suits than execute in > 2 seconds on our clean rhel6 build servers. For IO tests (Loading & Saving) we have applied a more generous threshold of > 5 seconds.

See the full list to see which tests have been assigned to you: http://www.mantidproject.org/images/2/2f/Slow_tests.xlsx_-_Sheet1.pdf

Criteria

  1. Test suits (each test class instance) should execute in < 1 second as a rough target
  2. As a corollary to the above, If the test suite contains lots of test methods aim for < 0.1 second per test method
  3. If for some reason you get the speed up the test below the target using the strategies listed below, you need to justify why when you close the ticket.

Guidelines/instructions to help

  1. Keep tests readable and improve code readability where possible. Unit tests are documentation.
  2. Do not delete test methods without good reason. We do not want to reduce test coverage
  3. Changing the algorithm code to improve speed is OK, but exercise caution. Add additional test coverage if it's not already good enough.
  4. Take test methods that are slow and involve IO, or are processor intensive and make them into system tests. Integration tests are not Unit tests.
  5. Most of the speed improvements will probably come from better selection of input data. Caching input data is also a good option.
  6. Create sub tickets for algorithms or groups of algorithms to help testability if you wish, but mark this ticket as the 'blocked' by each one.

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned
  • Owner changed from Peter Peterson to Vickie Lynch
  • Summary changed from Slow Unit Tests for Peter Peterson (cloned) to Slow Unit Tests for Vickie Lynch

comment:2 Changed 6 years ago by Owen Arnold

  • Blocking 9905 added

comment:3 Changed 6 years ago by Vickie Lynch

  • Status changed from assigned to inprogress

Refs #9894 remove FrameworkManager::Instance() from tests

Changeset: bcb12cfce4ad2edcacadcece3bfe72d655b46f54

comment:4 Changed 6 years ago by Vickie Lynch

Refs #9894 use helper for event workspace

Changeset: 5caebaab135bfea56dcfa60aa78db965889e7caf

comment:5 Changed 6 years ago by Vickie Lynch

Refs #9894 fix warning

Changeset: c7309614d5161be28e7c4900572598fbb8c937ec

comment:6 Changed 6 years ago by Vickie Lynch

Refs #9894 use FullInstrument instead of MINITOPAZ

Changeset: 946fb26e286480eb798c34928d64db5c0753d88e

comment:7 Changed 6 years ago by Vickie Lynch

  • Status changed from inprogress to verify
  • Resolution set to fixed

To test check times for running unit tests for AnvredCorrection, IntegratePeaksMD, IntegratePeaksMD2, CentroidPeaksMD, and CentroidPeaksMD2.

comment:8 Changed 6 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:9 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9894_Vickie_slow_unit_tests'

Full changeset: ec6f2edf5ec3bd1b683ad9bf735cf138ce610e4f

comment:10 Changed 6 years ago by Owen Arnold

Good work. These tests are all below the threshold now.

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10736

Note: See TracTickets for help on using tickets.