Page MenuHomePhabricator

Reduce LabelSetTest and ImageGeneratorTest execution times
Closed, ResolvedPublic

Description

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Related Objects

Event Timeline

kislinsk created this task.

Could it be that the test time out time is 600 sec? Because in the last month all tests runs of LabelSetTest with worked (as long as the duration was below 600 sec). All failed tests took longer then 600 sec.
For what ever reason under win the test is relativaly fast ~150-200 sec. Under linux/mac it is lurking arround 590 sec +- 25...

Yes, eventually the test times out. But even if it would "fix" the test to increase this value, individual unit tests should aim to last not longer than around a second, at maximum a few seconds.

1.5 reasons:

  • mitk::LabelSet::AddLabel() takes a pretty long time to complete while it fiddles around with an std::map
  • Not only does every test unnecessarily initialize a label set with 200 labels, but one test adds another 65535 labels to test the maximum allowed number of labels
kislinsk added a revision: Restricted Differential Revision.Nov 17 2020, 2:47 PM
kislinsk renamed this task from Investigate LabelSetTest to Reduce LabelSetTest execution time.Nov 17 2020, 10:57 PM
kislinsk renamed this task from Reduce LabelSetTest execution time to Reduce LabelSetTest and ImageGeneratorTest execution times.Nov 17 2020, 11:18 PM
kislinsk updated the task description. (Show Details)

Deleted branch bugfix/T27952-FixLabelSetTest.