Skip to content

Commit 4cf36bc

Browse files
authored
Increasing timeout and adding retry for notebook test (#212)
Description of changes: Increasing timeout and adding retry for notebook test. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent c2d08b4 commit 4cf36bc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/e2e/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
acktest @ git+https://github.com/aws-controllers-k8s/test-infra.git@0bf619e4653b31346a8f39de7b6ad8a1d1317ef2
22
black==20.8b1
3+
flaky==3.7.0

test/e2e/tests/test_notebook_instance.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
)
2929
from e2e.replacement_values import REPLACEMENT_VALUES
3030
import random
31+
from flaky import flaky
32+
3133

3234
DELETE_WAIT_PERIOD = 16
3335
DELETE_WAIT_LENGTH = 30
@@ -83,15 +85,15 @@ def get_notebook_instance_resource_status(reference: k8s.CustomResourceReference
8385
assert "notebookInstanceStatus" in resource["status"]
8486
return resource["status"]["notebookInstanceStatus"]
8587

86-
88+
@flaky(max_runs=2, min_passes=1)
8789
@pytest.mark.canary
8890
@service_marker
8991
class TestNotebookInstance:
9092
def _wait_resource_notebook_status(
9193
self,
9294
reference: k8s.CustomResourceReference,
9395
expected_status: str,
94-
wait_periods: int = 30,
96+
wait_periods: int = 40,
9597
period_length: int = 30,
9698
):
9799
return wait_for_status(
@@ -106,7 +108,7 @@ def _wait_sagemaker_notebook_status(
106108
self,
107109
notebook_instance_name: str,
108110
expected_status: str,
109-
wait_periods: int = 30,
111+
wait_periods: int = 40,
110112
period_length: int = 30,
111113
):
112114
return wait_for_status(
@@ -122,7 +124,7 @@ def _assert_notebook_status_in_sync(
122124
notebook_instance_name,
123125
reference,
124126
expected_status,
125-
wait_periods=30,
127+
wait_periods=40,
126128
period_length=30,
127129
):
128130
assert (

0 commit comments

Comments
 (0)