Repository navigation
Commit 50d9513
authored
test(dialogflow): deflake and re-enable test cases in ITSystemTest (#13511)
Each of these test cases failed 7/30 times locally without these fixes.
With the fixes applied, tests pass without flakes in 100+ runs.
- detectIntentTest() flaked regularly if the intent created in setUp()
didn't have sufficient time to fully propagate before detectIntent() was
called in the test case. Poll until detectIntent() returns a non-empty
result before proceeding to assertion on the content.
- listContextsTest() flaked if a system context was encountered (see
https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects.agent.environments.users.sessions.contexts/patch#path-parameters).
Adjust the flaky assertion to only look for the expected context while
tolerating others that happen to be present.
Fixes #104911 parent 8236771 commit 50d9513
2 files changed
Lines changed: 25 additions & 12 deletions
File tree
- java-dialogflow/google-cloud-dialogflow
- src/test/java/com/google/cloud/dialogflow/v2/it
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
262 | | - | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
288 | 296 | | |
289 | 297 | | |
290 | 298 | | |
291 | | - | |
292 | 299 | | |
293 | 300 | | |
294 | 301 | | |
295 | | - | |
296 | | - | |
297 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
298 | 306 | | |
299 | 307 | | |
300 | 308 | | |
| |||
0 commit comments