Skip to content

Commit 1a9602d

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,10 @@ public static async Task ServiceContract_TypedProxy_Task_Call_AsyncLocal_NonCapt
615615
// Force a Gen2 GC so that the WeakReference will no longer have the OperationContextExtension as a target.
616616
GC.Collect(2);
617617

618+
// wait for finalizers
619+
GC.WaitForPendingFinalizers();
620+
GC.Collect(2);
621+
618622
// *** VALIDATE *** \\
619623
Assert.Equal(requestString, result);
620624
Assert.False(opContextReference.TryGetTarget(out OperationContextExtension opContext), "OperationContextExtension should have been collected");

0 commit comments

Comments
 (0)