Commit e953ae5
authored
rework Table e2e tests to remove flakiness (#52)
There were two e2e tests that were flaky in
`test/e2e/tests/test_table.py`.
The flakiest test was test_enable_ttl, which often would result in the following:
```
> assert ttl["TimeToLiveDescription"]["AttributeName"] == "ForumName"
E KeyError: 'AttributeName'
tests/test_table.py:158: KeyError
```
This was caused by the dynamodb client `describe_time_to_live` returning
a `ResourceNotFoundException` when the Table was not in ACTIVE status
and even when the Table was in ACTIVE status, there is an amount of time
when the DescribeTimeToLive's TimeToLiveDescription output shape is
either empty or is a struct with no fields :(
I updated the test to first wait until the Table becomes ACTIVE and has
valid output responses before attempting to read the TTL information.
The second flaky test was the test_table_update_tags. The sleep after
calling the `kubectl patch` with the updated tags was too short at 5
seconds since it sometimes takes a little while for the tags to appear
in the Tagris APIs. Increasing this sleep to 10 fixes this flakiness.
Issue aws-controllers-k8s/community#1561
Signed-off-by: Jay Pipes <jaypipes@gmail.com>
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent eb1405d commit e953ae5
2 files changed
+147
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 83 | + | |
| 84 | + | |
90 | 85 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 86 | + | |
95 | 87 | | |
96 | 88 | | |
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
100 | 92 | | |
101 | | - | |
| 93 | + | |
102 | 94 | | |
103 | | - | |
| 95 | + | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
108 | 100 | | |
109 | | - | |
| 101 | + | |
110 | 102 | | |
111 | 103 | | |
112 | 104 | | |
| |||
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
132 | | - | |
| 124 | + | |
133 | 125 | | |
134 | 126 | | |
135 | 127 | | |
136 | 128 | | |
137 | 129 | | |
138 | | - | |
| 130 | + | |
139 | 131 | | |
140 | 132 | | |
141 | 133 | | |
| |||
152 | 144 | | |
153 | 145 | | |
154 | 146 | | |
155 | | - | |
156 | 147 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
0 commit comments