Skip to content

Commit 9708605

Browse files
committed
Fixing test.
1 parent 8d09ce0 commit 9708605

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/System.Private.ServiceModel/tests/Scenarios/Client/TypedClient/TypedProxyTests.4.0.0.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,11 @@ public static async Task ServiceContract_TypedProxy_Task_Call_AsyncLocal_NonCapt
613613
await Task.Yield();
614614

615615
// Force a Gen2 GC so that the WeakReference will no longer have the OperationContextExtension as a target.
616+
//GC.Collect(2);
617+
618+
// Force GC and wait for finalizers
619+
GC.Collect(2);
620+
GC.WaitForPendingFinalizers();
616621
GC.Collect(2);
617622

618623
// *** VALIDATE *** \\

0 commit comments

Comments
 (0)