Integration tests parallelism - part 1#209
Merged
carole-lavillonniere merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
fde6b55 to
2122f33
Compare
anisaoshafi
approved these changes
Apr 29, 2026
Contributor
anisaoshafi
left a comment
There was a problem hiding this comment.
great improvement already 12 -> 7 min 🏃🏼♀️
anisaoshafi
reviewed
Apr 29, 2026
| // writeAwsConfig writes a minimal aws-only config so tests don't inherit the | ||
| // developer's real ~/.config/lstk/config.toml (which may target a different | ||
| // emulator / running container). | ||
| func writeAwsConfig(t *testing.T) string { |
Contributor
There was a problem hiding this comment.
thanks for fixing this 🙏🏼
anisaoshafi
reviewed
Apr 29, 2026
Comment on lines
+21
to
+28
| appData := filepath.Join(tmpHome, "AppData", "Roaming") | ||
| e = env.Without("HOME", "XDG_CONFIG_HOME", "APPDATA", "USERPROFILE", "HOMEDRIVE", "HOMEPATH"). | ||
| With(env.Home, tmpHome). | ||
| With("USERPROFILE", tmpHome). | ||
| With("APPDATA", appData) | ||
| logPath = filepath.Join(appData, "lstk", "lstk.log") | ||
| } else { | ||
| require.NoError(t, os.MkdirAll(filepath.Join(tmpHome, ".config"), 0755)) |
Contributor
There was a problem hiding this comment.
sorry, a bit late, but noticed we have this func testEnvWithHome that could probably be reused since it already handles the env for different OS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First pass at parallelizing the integration test suite, only addresses the low-hanging fruits. Docker-dependent tests are left serial for a follow-up since they share container name, ports and the host's Docker daemon.
Execution time goes from about 12min to 7min.
towards DRG-665
Changes
t.Parallel()added to tests that are safe to run concurrentlyHOME/XDG_CONFIG_HOMEContainerStopcalls beforeContainerRemove(Force: true)in cleanup because Force-remove already SIGKILLs; an explicit stop first would add the default 10s SIGTERM grace period for nothing.