kyverno / kyverno

Cloud Native Policy Management
https://kyverno.io
Apache License 2.0
5.8k stars 893 forks source link

[test] Unit test speed improvement #11679

Open Rohanraj123 opened 2 days ago

Rohanraj123 commented 2 days ago

Problem Statement

Its just a suggestion. Improvement of unit testing speed allows to complete testing in less time. And Here's a blog that describes it clearly. Now I looked at the codebase and didnt saw any implementation of parallelism in testing. Now there might have some reason that I am not aware of ( Please let me know if any) otherwise I did implemented it in running two testcases( Test_ImageVerifyCacheDisabled, Test_ImageVerifyCacheExpiredCosign ) parallely and i think it reduced testing time.

Before: Screenshot from 2024-11-26 22-37-28

After: Screenshot from 2024-11-26 22-32-50

Idea is to use t.paralle() carefully where it is reliable to run test cases parallely.

Solution Description

Using t.paralle() to run test cases parallely.

Alternatives

No response

Additional Context

No response

Slack discussion

No Response

Research

welcome[bot] commented 2 days ago

Thanks for opening your first issue here! Be sure to follow the issue template!