Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Oct 18, 2023
Merged

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Oct 18, 2023

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
Copy link

Coverage Status

coverage: 97.759%. remained the same when pulling 1365974 on test_performance into 5ba6fc2 on master.

Copy link
Member

@mvidner mvidner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BTW have you tried rspec --profile?

Copy link
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that on my system it is more than twice faster.

@ancorgs ancorgs merged commit c7d9c4a into master Oct 18, 2023
17 checks passed
@ancorgs ancorgs deleted the test_performance branch October 18, 2023 14:27
@yast-bot
Copy link

✔️ Internal Jenkins job #1140 successfully finished
✔️ Created OBS submit request #1118993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants