-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: run integration tests concurrently #134
Changes from all commits
93646cc
c7aba29
5a59106
b57dbfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,8 @@ IMG ?= $(DEFAULT_IMG) | |
UNIT_DIRS := ./pkg/... ./api/... | ||
INTEGRATION_TEST_SUITE_PATHS := ./controllers/... | ||
INTEGRATION_COVER_PKGS := ./pkg/...,./controllers/...,./api/... | ||
INTEGRATION_TEST_NUM_CORES ?= 4 | ||
INTEGRATION_TEST_NUM_PROCESSES ?= 10 | ||
|
||
# Limitador Operator replaced version | ||
DEFAULT_REPLACES_VERSION = 0.0.0-alpha | ||
|
@@ -228,8 +230,15 @@ test-integration: clean-cov generate fmt vet ginkgo ## Run Integration tests. | |
--coverpkg $(INTEGRATION_COVER_PKGS) \ | ||
--output-dir $(PROJECT_PATH)/coverage/integration \ | ||
--coverprofile cover.out \ | ||
--fail-fast \ | ||
-v \ | ||
--compilers=$(INTEGRATION_TEST_NUM_CORES) \ | ||
--procs=$(INTEGRATION_TEST_NUM_PROCESSES) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can give
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the issue with CI envs... ok. Let's give it a try There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tried to use It's about 1.5 mins slower than previous where we able to specify to run using 10 processes instead 🤔 Probably will revert to the previous commit since it looks like github CI is able to support it unless you want to go with |
||
--randomize-all \ | ||
--randomize-suites \ | ||
--fail-on-pending \ | ||
--keep-going \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not an strong opinion here. But if one test fails, I prefer the test suite to end. I do not need to know how many tests are failing. I fix the failing test and trying again the whole suite. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My preference is to use the Can revert back to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's give it a try. If the test duration was too long, I think it is best |
||
--race \ | ||
--trace \ | ||
$(INTEGRATION_TEST_SUITE_PATHS) | ||
|
||
ifdef TEST_NAME | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove
--fail-fast
? is it incompatible with concurrent tests?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mainly to align with Kuadrant Operator where the
fail-fast
flag was removed and by the recommendation at https://onsi.github.io/ginkgo/#recommended-continuous-integration-configuration.I assume the flag works with concurrent tests. I don't feel too strongly with this so I can revert to keeping the flag if you feel strongly with this