Skip to content

Commit 4ef1472

Browse files
authored
Add sleep to another inproc test (#5935)
Apparently the class name tests can also suffer from the completion race; add a wait to the other test that expects the module to unload.
1 parent d147071 commit 4ef1472

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/AppInstallerCLIE2ETests/InprocTestbedTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,17 @@ public void CLSID_Tests(bool leakCOM, UnloadBehavior unloadBehavior, int? workTe
122122
/// <param name="freeCachedFactories">Control whether the C++/WinRT factory cache will be cleared between iterations.</param>
123123
/// <param name="leakCOM">Control whether COM should be uninitialized at the end of the process.</param>
124124
/// <param name="unloadBehavior">Set the unload behavior for the test.</param>
125+
/// <param name="workTestSleep">Sets the number of milliseconds to sleep between each work/test iteration.</param>
125126
[Test]
126127
[TestCase(false, false, UnloadBehavior.AtUninitialize)]
127128
[TestCase(false, false, UnloadBehavior.Never)]
128129
[TestCase(false, true, UnloadBehavior.Allow)]
129130
[TestCase(false, true, UnloadBehavior.Never)]
130131
[TestCase(true, false, UnloadBehavior.AtUninitialize)]
131132
[TestCase(true, false, UnloadBehavior.Never)]
132-
[TestCase(true, true, UnloadBehavior.Allow)]
133+
[TestCase(true, true, UnloadBehavior.Allow, 1000)]
133134
[TestCase(true, true, UnloadBehavior.Never)]
134-
public void TypeName_Tests(bool freeCachedFactories, bool leakCOM, UnloadBehavior unloadBehavior)
135+
public void TypeName_Tests(bool freeCachedFactories, bool leakCOM, UnloadBehavior unloadBehavior, int? workTestSleep = null)
135136
{
136137
this.RunInprocTestbed(new TestbedParameters()
137138
{
@@ -140,6 +141,7 @@ public void TypeName_Tests(bool freeCachedFactories, bool leakCOM, UnloadBehavio
140141
LeakCOM = leakCOM,
141142
UnloadBehavior = unloadBehavior,
142143
Iterations = 10,
144+
WorkTestSleepInterval = workTestSleep,
143145
});
144146
}
145147

0 commit comments

Comments
 (0)