-
Notifications
You must be signed in to change notification settings - Fork 277
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4600 +/- ##
==========================================
- Coverage 69.55% 69.06% -0.49%
==========================================
Files 220 225 +5
Lines 15800 16365 +565
==========================================
+ Hits 10990 11303 +313
- Misses 4760 5010 +250
- Partials 50 52 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
05fe1ce
to
ff1bdad
Compare
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
tests/e2e/e2e_retry_policy_test.go
Outdated
// wait for server | ||
time.Sleep(3 * time.Second) |
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.
Probably not something to change in this PR, but if this is to wait for the retry policy to have taken effect, a better solution might be to add a status
to retries like we have for IngressBackends which can be queried whereas a sleep like this is a roll of the dice to a degree.
osm/pkg/apis/policy/v1alpha1/ingress_backend.go
Lines 102 to 111 in 07cc4a8
// IngressBackendStatus is the type used to represent the status of an IngressBackend resource. | |
type IngressBackendStatus struct { | |
// CurrentStatus defines the current status of an IngressBackend resource. | |
// +optional | |
CurrentStatus string `json:"currentStatus,omitempty"` | |
// Reason defines the reason for the current status of an IngressBackend resource. | |
// +optional | |
Reason string `json:"reason,omitempty"` | |
} |
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.
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
tests/e2e/e2e_retry_policy_test.go
Outdated
} | ||
|
||
By("A request that will be retried NumRetries times then succeed") | ||
time.Sleep(3 * time.Second) |
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.
For my own understanding, why are we sleeping 3 seconds here?
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.
The sleep was to wait for the retry policy to be applied, there's an issue to add a Status field for Retry in the future so that this won't be needed. #4600 (comment)
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
tests/e2e/e2e_retry_policy_test.go
Outdated
var _ = OSMDescribe("Test Retry Policy", | ||
OSMDescribeInfo{ | ||
Tier: 2, | ||
Bucket: 8, |
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.
Nit: move to bucket 4 which typically completes sooner than other buckets. This helps in keeping the bucket times more balanced.
Signed-off-by: Shalier Xia <shalierxia@microsoft.com>
Description:
Adds E2E testing for retry policy
Testing done:
Affected area:
Please answer the following questions with yes/no.
Does this change contain code from or inspired by another project?
Is this a breaking change?
Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?