Commit b7fedbd
fix: failing DNS integration tests by using long-running functions (#8889)
* fix: fix failing DNS integration tests by using long-running functions
The DNS container inspection tests were failing because Lambda containers
exit immediately after the handler completes, making inspection impossible.
Changes:
- test_invoke_dns.py: Use WriteToStdoutFunction instead of HelloWorldServerlessFunction
to avoid KeyError when no_event=True is passed
- test_start_api_dns.py: Use threading with /sleepfortenseconds endpoint to keep
container alive during inspection
- test_start_lambda_dns.py: Use threading with HelloWorldSleepFunction to keep
container alive during inspection
All tests now use long-running functions (10+ seconds) with async threading
pattern, allowing enough time to inspect running containers before they exit.
Fixes tests that were failing after #8878 was merged.
* fix: black formatting
---------
Co-authored-by: Kandarp Ajvalia <ajvalia@amazon.com>1 parent b32bf16 commit b7fedbd
3 files changed
Lines changed: 42 additions & 8 deletions
File tree
- tests/integration/local
- invoke
- start_api
- start_lambda
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
79 | | - | |
| 92 | + | |
80 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
82 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
116 | | - | |
| 129 | + | |
117 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
0 commit comments