Skip to content

Commit f0fce03

Browse files
afifi-insmconnew
authored andcommitted
fix test
1 parent 02ddc7b commit f0fce03

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using Infrastructure.Common;
1212
using Xunit;
1313

14-
public partial class TypedProxyTests : ConditionalWcfTest
14+
public static partial class TypedProxyTests
1515
{
1616
// ServiceContract typed proxy tests create a ChannelFactory using a provided [ServiceContract] Interface which...
1717
// returns a generated proxy based on that Interface.
@@ -567,7 +567,6 @@ private static void ServiceContract_TypedProxy_AsyncTask_Call_TestImpl(Binding b
567567
}
568568

569569
[WcfFact]
570-
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
571570
[OuterLoop]
572571
public static async Task ServiceContract_TypedProxy_Task_Call_AsyncLocal_NonCapture()
573572
{
@@ -594,6 +593,9 @@ public static async Task ServiceContract_TypedProxy_Task_Call_AsyncLocal_NonCapt
594593
// *** EXECUTE *** \\
595594
var opExtension = new OperationContextExtension();
596595
opContextReference = new WeakReference<OperationContextExtension>(opExtension);
596+
597+
// force ExecutionContext to capture the null OperationContext
598+
await Task.Yield();
597599
using (new OperationContextScope((IContextChannel)serviceProxy))
598600
{
599601
OperationContext.Current.Extensions.Add(opExtension);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using Infrastructure.Common;
1414
using Xunit;
1515

16-
public partial class TypedProxyTests
16+
public static partial class TypedProxyTests
1717
{
1818
[WcfFact]
1919
[OuterLoop]

0 commit comments

Comments
 (0)