yast / yast-storage-ng

Rewrite of https://github.com/yast/yast-storage
http://yast.github.io/
GNU General Public License v2.0
13 stars 19 forks source link

Speed-up tests a bit in systems with slow hwinfo #1361

Closed ancorgs closed 9 months ago

ancorgs commented 9 months ago

Problem

The testsuite used to run in around 2-4 minutes in my personal system.

We have always known that we should be more aggressive mocking calls to hwinfo and some libstorage-ng operations (mostly those that result in calls to udevadm --settle). But even without that mocking, the situation was still acceptable.

Recently things became MUCH worse. Now the testsuite is much slower. I was not able to find what caused it. No luck bisecting the changes in the repository, so I guess the problem is somewhere else (some combination of changes in libstorage-ng or another YaST package, Ruby, the Tumbleweed kernel, udev and whatnot).

Solution

Even if the source of the recent slow-down is still there, I decided to introduce the long-overdue mocking for hwinfo in order to mitigate the problem.

Now the execution time is acceptable again, even if there is still room for improvement (if someone can find why/how at some point we went from a couple of minutes to ~10mins).

coveralls commented 9 months ago

Coverage Status

coverage: 97.759%. remained the same when pulling 1365974663d320e347cfa6f1117edf6e4b1d2cd7 on test_performance into 5ba6fc2f5461bf570f8c4ff98f07ac64898bf7bd on master.

yast-bot commented 9 months ago

:heavy_check_mark: Internal Jenkins job #1140 successfully finished :heavy_check_mark: Created OBS submit request #1118993