Commit 3cb22d9
authored
Add sleep to allow background threads to quiesce (microsoft#5933)
## Issue
One of the inproc tests is failing because the module is not unloaded
(nor are any of the statics destroyed) after the attempt to unload it
through `CoFreeUnusedLibrariesEx`. This suggests that objects are still
active and the unload is doing the correct thing.
While this could be a leak, the initial thinking is that this test fails
due to the background threads racing to finish up their work as the main
thread continues on after the completion is signaled. The name-based
tests that expect the module to unload also need to free the activation
factories that C++/WinRT caches before calling into the test method,
which appears to be giving them enough time to complete successfully.
## Change
Add a sleep option to the tests and use it for the failing one. A more
invasive solution would be to use the shutdown monitoring the forcibly
close out and wait for the background threads, but test only exports are
a pain to manage.1 parent 920c411 commit 3cb22d9
File tree
4 files changed
+23
-2
lines changed- src
- AppInstallerCLIE2ETests
- ComInprocTestbed
4 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
| |||
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| 205 | + | |
| 206 | + | |
198 | 207 | | |
199 | 208 | | |
200 | 209 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
259 | 264 | | |
260 | 265 | | |
261 | 266 | | |
| 267 | + | |
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
0 commit comments