Repository navigation
Reduce IT test times - #1178
Reduce IT test times#1178gagan16k wants to merge 8 commits into
Conversation
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
|
/kind enhancement |
|
Thanks for doing this. Looking at this |
| WithArguments(ctx, helpers.McdName, controlClusterNamespace). | ||
| Should(gomega.BeTrue()) | ||
| ginkgo.By("Ensuring the test resources are cleaned up") | ||
| c.cleanTestResources(ctx, 900) |
There was a problem hiding this comment.
This feels incorrect. There is no error checking for cleanTestResources. Is that intended ? Wont' that cause issues ie cleanup failure might produce false negatives in the orphan test. (at-least I think so)
| } | ||
| // Re-enqueue to re-check the timeout when it is due, bounded to [ShortRetry, 1m] | ||
| // Ensures that small timeouts do not wait too long, while larger timeouts are not polled too frequently. | ||
| sleepTime := min(max(timeOutDuration-timeElapsed, time.Duration(machineutils.ShortRetry)), time.Minute) |
There was a problem hiding this comment.
Can you move this into the else branch ?
| // If timeout has not occurred, re-enqueue the machine | ||
| // after a specified sleep time | ||
| klog.V(4).Infof("Creation/Health Timeout hasn't occured yet , will re-enqueue after %s", time.Duration(sleepTime)) | ||
| klog.V(4).Infof("Creation/Health Timeout hasn't occured yet , will re-enqueue after %s", sleepTime) |
| func (c *IntegrationTestFramework) runControllersLocally() { | ||
| ginkgo.By("Starting Machine Controller ") | ||
| args := strings.Fields( | ||
| // buildMCStartArgs builds the `make start` command used to launch the machine controller locally. |
There was a problem hiding this comment.
Lol, yes, we should have done this ages instead of duplicating startup logic - which might also need to change in future depending on environment type.
| @@ -0,0 +1,178 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Please add a FAQ note https://github.com/gardener/machine-controller-manager/blob/master/docs/faq.md#internals on how and when to use this script
| Usage: $(basename "$0") [-n RUNS] [-o OUT_DIR] [-f FOCUS] [-s] [-v] | ||
|
|
||
| -n RUNS Number of times to run the integration test suite (default: ${RUNS}) | ||
| -o OUT_DIR Directory to write per-run logs and the summary (default: ${BASE_DIR}/<timestamp>) |
There was a problem hiding this comment.
Seems some mismatch in usage/default. hack/logs/ is the default for BASE_DIR. It is relative to where it is invoked, not where the script lives.
Signed-off-by: Gagan163264 <gagan.surathkal@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR makes following changes to the integration tests:
IsMachineTerminatingOrDeletedinstead ofIsMachineDeletedmakes it such that the tests do not wait onTerminatingmachines where it is not necessary, and the MCM process takes care of it in the background. This speeds up the suite significantly.Running.ginkgo.Bysteps include the machine/node name (matching the convention already used by the preservation specs), making test output identify which machine each step acted on.cleanTestResourcestears down all test machine deployments and machinesAdditionally, added a change to the machine controller health check code. Previously, any [
Pending,InPlaceUpdate,Health] timeouts would have a hardcoded 1 minute re-enqueue time.Replaced this with an bounded timeout [
ShortRetry(5s),1 Minute]. For the test code, this makes it such that health reconciliations happen much more deterministically and do not wait, in case kwok headbeat gets missed.New test times:
Release note: