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

Tests optimizations #2567

Closed
wants to merge 8 commits into from
Closed

Tests optimizations #2567

wants to merge 8 commits into from

Conversation

hairyhum
Copy link
Contributor

Change Overview

Follow-up to #2534

  • Run test suites in parallel
  • Handle sigterm in some test containers
  • Optimize sleeps and timeouts

NOTE: We currently use env variables to configure kanister and that prevents some tests from running in parallel. Currently using testmutex mutex to block them.
This is not ideal solution, but other options such as regex matching or build tags are just worse.
We could rework controller and API configuration so it doesn't rely on environment variables, which can potentially make it safer.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@infraq infraq added this to In Progress in Kanister Dec 20, 2023
@hairyhum hairyhum force-pushed the ci-test-optimization branch 2 times, most recently from 58f094d to 928eba3 Compare December 21, 2023 18:08
@hairyhum hairyhum marked this pull request as ready for review December 21, 2023 19:07
@hairyhum hairyhum force-pushed the ci-test-optimization branch 3 times, most recently from 38991d0 to 2770556 Compare December 22, 2023 17:09
@e-sumin e-sumin self-requested a review January 4, 2024 17:31
Parallel test suites are running in the same process, which makes
them share env variables.

Use mutex to block tests from running concurrently. Not the pretiest
solution, but all others like build tags are quite tricky to apply
right.

Ideally we shouldn't rely on environment variables for this configuration.
Make it so controller namespace is checked only when needed
Deprecate GetControllerServiceAccount
@hairyhum
Copy link
Contributor Author

This one is stale and will require some work to update all tests. Closing for now, can be a reference if we want to attempt to improve test performance in the future.

@hairyhum hairyhum closed this May 27, 2024
Kanister automation moved this from In Progress to Done May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants