Add Unit Tests that verify stats reporting in autoscaler#6912
Add Unit Tests that verify stats reporting in autoscaler#6912knative-prow-robot merged 1 commit intoknative:masterfrom
Conversation
|
Hi @MIBc. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @vagababov |
vagababov
left a comment
There was a problem hiding this comment.
Thanks. This looks reasonable.
Can you also check that PanicM is set and unset.
| return int32(math.Floor(totCap/targetUtilization*numPods - targetBC - recordedConcurrency)) | ||
| } | ||
|
|
||
| func expectedExcessBCF(originalReadyPodsCount int, totalValue, observedStableValue, targetBurstCapacity float64) float64 { |
There was a problem hiding this comment.
this is the same as the method above just with different argument names and order
There was a problem hiding this comment.
I have combined these two tests and added PanicM.
There was a problem hiding this comment.
I meant expectedEBC is an existing method. This method you wrote is a duplicate and can be removed.
| return int32(math.Floor(totCap/targetUtilization*numPods - targetBC - recordedConcurrency)) | ||
| } | ||
|
|
||
| func expectedExcessBCF(originalReadyPodsCount int, totalValue, observedStableValue, targetBurstCapacity float64) float64 { |
There was a problem hiding this comment.
I meant expectedEBC is an existing method. This method you wrote is a duplicate and can be removed.
| a.expectScale(t, time.Now(), 5, expectedEBC(10, 100, 50, 1), true) | ||
| spec, podCounter := a.currentSpecAndPC() | ||
| originalReadyPodsCount, _ := podCounter.ReadyCount() | ||
| wantTags := map[string]string{} |
There was a problem hiding this comment.
Shouldn't the tags be non-empty?
I think we create the autoscaler with empty context, but for this test we probably want a one with tags set to make sure we use the correct one.
6c78af3 to
7540d70
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MIBc, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@MIBc: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
|
The following jobs failed:
Automatically retrying due to test flakiness... |
|
/lgtm |
Fixes #6772