Skip to content

Commit d11e770

Browse files
committed
Skip CoreWCF Failed Tests
1 parent 1af2b0f commit d11e770

32 files changed

+254
-163
lines changed

Diff for: eng/SendToHelix.proj

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<HelixPreCommands>$(HelixPreCommands);set DOTNET_CLI_HOME=%HELIX_WORKITEM_ROOT%\.dotnet</HelixPreCommands>
8686
<HelixPreCommands>$(HelixPreCommands);set NUGET_PACKAGES=%HELIX_WORKITEM_ROOT%\.nuget</HelixPreCommands>
8787
<HelixPreCommands>$(HelixPreCommands);set ServiceUri=localhost</HelixPreCommands>
88+
<HelixPreCommands>$(HelixPreCommands);set RunWithCoreWCFService=true</HelixPreCommands>
8889
<HelixPreCommands>$(HelixPreCommands);%HELIX_CORRELATION_PAYLOAD%\SelfHostedCoreWCFService\$(Configuration)\net8.0\SelfHostedCoreWCFService bootstrap:true</HelixPreCommands>
8990
</PropertyGroup>
9091

@@ -94,6 +95,7 @@
9495
<HelixPreCommands>$(HelixPreCommands);export DOTNET_CLI_HOME=$HELIX_WORKITEM_ROOT/.dotnet</HelixPreCommands>
9596
<HelixPreCommands>$(HelixPreCommands);export NUGET_PACKAGES=$HELIX_WORKITEM_ROOT/.nuget</HelixPreCommands>
9697
<HelixPreCommands>$(HelixPreCommands);export ServiceUri=localhost</HelixPreCommands>
98+
<HelixPreCommands>$(HelixPreCommands);export RunWithCoreWCFService=true</HelixPreCommands>
9799
<HelixPreCommands>$(HelixPreCommands);dotnet exec --roll-forward Major $HELIX_CORRELATION_PAYLOAD/SelfHostedCoreWCFService/$(Configuration)/net8.0/SelfHostedCoreWCFService.dll bootstrap:true</HelixPreCommands>
98100
</PropertyGroup>
99101

Diff for: src/System.Private.ServiceModel/tests/Common/Infrastructure/ConditionalTestDetectors.cs

+13
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@ public static bool IsWindowsOrSelfHosted()
156156
return false;
157157
}
158158

159+
// Returns 'true' if the server is running with CoreWCF Service
160+
public static bool IsRunWithCoreWCFService()
161+
{
162+
string runWithCoreWCFService = TestProperties.GetProperty(TestProperties.RunWithCoreWCFService_PropertyName);
163+
164+
if (String.IsNullOrWhiteSpace(runWithCoreWCFService))
165+
{
166+
return false;
167+
}
168+
169+
return true;
170+
}
171+
159172
// Returns 'true' if the server is running as localhost.
160173
// This test is meant to be used only to detect that our service URI
161174
// indicates localhost. It is not intended to be used to detect that

Diff for: src/System.Private.ServiceModel/tests/Common/Infrastructure/ConditionalWcfTest.cs

+8
Original file line numberDiff line numberDiff line change
@@ -387,5 +387,13 @@ public static string GetSPN()
387387
{
388388
return ConditionalTestDetectors.GetSPN();
389389
}
390+
391+
// Returns 'false' if run with CoreWCF Service,
392+
// skip failed test
393+
public static bool Skip_CoreWCFService_FailedTest()
394+
{
395+
return !GetConditionValue(nameof(Skip_CoreWCFService_FailedTest),
396+
ConditionalTestDetectors.IsRunWithCoreWCFService);
397+
}
390398
}
391399
}

Diff for: src/System.Private.ServiceModel/tests/Common/Infrastructure/testproperties.props

+121-118
Original file line numberDiff line numberDiff line change
@@ -2,149 +2,152 @@
22
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44

5-
<!-- Set default values for any TestProperties not already specified.
5+
<!-- Set default values for any TestProperties not already specified.
66
When adding or removing TestProperties, update testproperties.targets
77
to generate code at build time.
88
-->
9-
<PropertyGroup Condition="'$(ServicePort)' == ''">
10-
<ServicePort>44283</ServicePort>
11-
</PropertyGroup>
9+
<PropertyGroup Condition="'$(ServicePort)' == ''">
10+
<ServicePort>44283</ServicePort>
11+
</PropertyGroup>
1212

13-
<PropertyGroup Condition="'$(ServiceHttpPort)' == ''">
14-
<ServiceHttpPort>8081</ServiceHttpPort>
15-
</PropertyGroup>
13+
<PropertyGroup Condition="'$(ServiceHttpPort)' == ''">
14+
<ServiceHttpPort>8081</ServiceHttpPort>
15+
</PropertyGroup>
1616

17-
<PropertyGroup Condition="'$(ServiceHttpsPort)' == ''">
18-
<ServiceHttpsPort>44285</ServiceHttpsPort>
19-
</PropertyGroup>
17+
<PropertyGroup Condition="'$(ServiceHttpsPort)' == ''">
18+
<ServiceHttpsPort>44285</ServiceHttpsPort>
19+
</PropertyGroup>
2020

21-
<PropertyGroup Condition="'$(ServiceTcpPort)' == ''">
22-
<ServiceTcpPort>8808</ServiceTcpPort>
23-
</PropertyGroup>
21+
<PropertyGroup Condition="'$(ServiceTcpPort)' == ''">
22+
<ServiceTcpPort>8808</ServiceTcpPort>
23+
</PropertyGroup>
2424

25-
<PropertyGroup Condition="'$(ServiceWebSocketPort)' == ''">
26-
<ServiceWebSocketPort>8083</ServiceWebSocketPort>
27-
</PropertyGroup>
25+
<PropertyGroup Condition="'$(ServiceWebSocketPort)' == ''">
26+
<ServiceWebSocketPort>8083</ServiceWebSocketPort>
27+
</PropertyGroup>
2828

29-
<PropertyGroup Condition="'$(ServiceSecureWebSocketPort)' == ''">
30-
<ServiceSecureWebSocketPort>8084</ServiceSecureWebSocketPort>
31-
</PropertyGroup>
29+
<PropertyGroup Condition="'$(ServiceSecureWebSocketPort)' == ''">
30+
<ServiceSecureWebSocketPort>8084</ServiceSecureWebSocketPort>
31+
</PropertyGroup>
3232

33-
<PropertyGroup Condition="'$(TestRootCertificatePassword)' == ''">
34-
<TestRootCertificatePassword>test</TestRootCertificatePassword>
35-
</PropertyGroup>
33+
<PropertyGroup Condition="'$(TestRootCertificatePassword)' == ''">
34+
<TestRootCertificatePassword>test</TestRootCertificatePassword>
35+
</PropertyGroup>
3636

37-
<PropertyGroup Condition="'$(TestRootCertificateValidityPeriod)' == ''">
38-
<TestRootCertificateValidityPeriod>7.00:00:00</TestRootCertificateValidityPeriod>
39-
</PropertyGroup>
37+
<PropertyGroup Condition="'$(TestRootCertificateValidityPeriod)' == ''">
38+
<TestRootCertificateValidityPeriod>7.00:00:00</TestRootCertificateValidityPeriod>
39+
</PropertyGroup>
4040

41-
<PropertyGroup Condition="'$(MaxTestTimeSpan)' == ''">
42-
<MaxTestTimeSpan>00:01:00</MaxTestTimeSpan>
43-
</PropertyGroup>
41+
<PropertyGroup Condition="'$(MaxTestTimeSpan)' == ''">
42+
<MaxTestTimeSpan>00:01:00</MaxTestTimeSpan>
43+
</PropertyGroup>
4444

45-
<PropertyGroup Condition="'$(NegotiateTestRealm)' == ''">
46-
<NegotiateTestRealm></NegotiateTestRealm>
47-
</PropertyGroup>
45+
<PropertyGroup Condition="'$(NegotiateTestRealm)' == ''">
46+
<NegotiateTestRealm></NegotiateTestRealm>
47+
</PropertyGroup>
4848

49-
<PropertyGroup Condition="'$(NegotiateTestDomain)' == ''">
50-
<NegotiateTestDomain></NegotiateTestDomain>
51-
</PropertyGroup>
49+
<PropertyGroup Condition="'$(NegotiateTestDomain)' == ''">
50+
<NegotiateTestDomain></NegotiateTestDomain>
51+
</PropertyGroup>
5252

53-
<PropertyGroup Condition="'$(NegotiateTestSpn)' == ''">
54-
<NegotiateTestSpn></NegotiateTestSpn>
55-
</PropertyGroup>
53+
<PropertyGroup Condition="'$(NegotiateTestSpn)' == ''">
54+
<NegotiateTestSpn></NegotiateTestSpn>
55+
</PropertyGroup>
5656

57-
<PropertyGroup Condition="'$(NegotiateTestUpn)' == ''">
58-
<NegotiateTestUpn></NegotiateTestUpn>
59-
</PropertyGroup>
57+
<PropertyGroup Condition="'$(NegotiateTestUpn)' == ''">
58+
<NegotiateTestUpn></NegotiateTestUpn>
59+
</PropertyGroup>
6060

61-
<!-- Convention for TestProperties values to use by [ConditionalFact]:
61+
<!-- Convention for TestProperties values to use by [ConditionalFact]:
6262
'true' = yes, the condition is satisfied
6363
'false' = no, the condition is not satisfied
6464
empty string = self-detect at runtime if possible, else assume 'false'
6565
-->
66-
<PropertyGroup Condition="'$(Domain_Joined)' == ''">
67-
<Domain_Joined></Domain_Joined>
68-
</PropertyGroup>
69-
70-
<PropertyGroup Condition="'$(Server_Domain_Joined)' == ''">
71-
<Server_Domain_Joined></Server_Domain_Joined>
72-
</PropertyGroup>
73-
74-
<PropertyGroup Condition="'$(Root_Certificate_Installed)' == ''">
75-
<Root_Certificate_Installed></Root_Certificate_Installed>
76-
</PropertyGroup>
77-
78-
<PropertyGroup Condition="'$(Client_Certificate_Installed)' == ''">
79-
<Client_Certificate_Installed></Client_Certificate_Installed>
80-
</PropertyGroup>
81-
82-
<PropertyGroup Condition="'$(Peer_Certificate_Installed)' == ''">
83-
<Peer_Certificate_Installed></Peer_Certificate_Installed>
84-
</PropertyGroup>
85-
86-
<PropertyGroup Condition="'$(OSXPeer_Certificate_Installed)' == ''">
87-
<OSXPeer_Certificate_Installed></OSXPeer_Certificate_Installed>
88-
</PropertyGroup>
89-
90-
<PropertyGroup Condition="'$(SPN_Available)' == ''">
91-
<SPN_Available></SPN_Available>
92-
</PropertyGroup>
93-
94-
<PropertyGroup Condition="'$(NTLM_Available)' == ''">
95-
<NTLM_Available></NTLM_Available>
96-
</PropertyGroup>
97-
98-
<PropertyGroup Condition="'$(Ambient_Credentials_Available)' == ''">
99-
<Ambient_Credentials_Available></Ambient_Credentials_Available>
100-
</PropertyGroup>
101-
102-
<PropertyGroup Condition="'$(Explicit_Credentials_Available)' == ''">
103-
<Explicit_Credentials_Available></Explicit_Credentials_Available>
104-
</PropertyGroup>
105-
106-
<PropertyGroup Condition="'$(Server_Accepts_Certificates)' == ''">
107-
<Server_Accepts_Certificates></Server_Accepts_Certificates>
108-
</PropertyGroup>
109-
110-
<PropertyGroup Condition="'$(Basic_Authentication_Available)' == ''">
111-
<Basic_Authentication_Available></Basic_Authentication_Available>
112-
</PropertyGroup>
113-
114-
<PropertyGroup Condition="'$(Digest_Authentication_Available)' == ''">
115-
<Digest_Authentication_Available></Digest_Authentication_Available>
116-
</PropertyGroup>
117-
118-
<PropertyGroup Condition="'$(Windows_Authentication_Available)' == ''">
119-
<Windows_Authentication_Available></Windows_Authentication_Available>
120-
</PropertyGroup>
121-
122-
<PropertyGroup Condition="'$(ServiceUri)' == ''">
123-
<ServiceUri >localhost</ServiceUri >
124-
</PropertyGroup>
125-
126-
<PropertyGroup Condition="'$(ExplicitUserName)' == ''">
127-
<ExplicitUserName ></ExplicitUserName >
128-
</PropertyGroup>
129-
130-
<PropertyGroup Condition="'$(ExplicitPassword)' == ''">
131-
<ExplicitPassword ></ExplicitPassword >
132-
</PropertyGroup>
133-
134-
<PropertyGroup Condition="'$(SSL_Available)' == ''">
135-
<SSL_Available></SSL_Available>
136-
</PropertyGroup>
137-
138-
<!-- The default value of $(IncludeTestsWithIssues) is blank, which is equivalent fo 'false'.
66+
<PropertyGroup Condition="'$(Domain_Joined)' == ''">
67+
<Domain_Joined></Domain_Joined>
68+
</PropertyGroup>
69+
70+
<PropertyGroup Condition="'$(Server_Domain_Joined)' == ''">
71+
<Server_Domain_Joined></Server_Domain_Joined>
72+
</PropertyGroup>
73+
74+
<PropertyGroup Condition="'$(Root_Certificate_Installed)' == ''">
75+
<Root_Certificate_Installed></Root_Certificate_Installed>
76+
</PropertyGroup>
77+
78+
<PropertyGroup Condition="'$(Client_Certificate_Installed)' == ''">
79+
<Client_Certificate_Installed></Client_Certificate_Installed>
80+
</PropertyGroup>
81+
82+
<PropertyGroup Condition="'$(Peer_Certificate_Installed)' == ''">
83+
<Peer_Certificate_Installed></Peer_Certificate_Installed>
84+
</PropertyGroup>
85+
86+
<PropertyGroup Condition="'$(OSXPeer_Certificate_Installed)' == ''">
87+
<OSXPeer_Certificate_Installed></OSXPeer_Certificate_Installed>
88+
</PropertyGroup>
89+
90+
<PropertyGroup Condition="'$(SPN_Available)' == ''">
91+
<SPN_Available></SPN_Available>
92+
</PropertyGroup>
93+
94+
<PropertyGroup Condition="'$(NTLM_Available)' == ''">
95+
<NTLM_Available></NTLM_Available>
96+
</PropertyGroup>
97+
98+
<PropertyGroup Condition="'$(Ambient_Credentials_Available)' == ''">
99+
<Ambient_Credentials_Available></Ambient_Credentials_Available>
100+
</PropertyGroup>
101+
102+
<PropertyGroup Condition="'$(Explicit_Credentials_Available)' == ''">
103+
<Explicit_Credentials_Available></Explicit_Credentials_Available>
104+
</PropertyGroup>
105+
106+
<PropertyGroup Condition="'$(Server_Accepts_Certificates)' == ''">
107+
<Server_Accepts_Certificates></Server_Accepts_Certificates>
108+
</PropertyGroup>
109+
110+
<PropertyGroup Condition="'$(Basic_Authentication_Available)' == ''">
111+
<Basic_Authentication_Available></Basic_Authentication_Available>
112+
</PropertyGroup>
113+
114+
<PropertyGroup Condition="'$(Digest_Authentication_Available)' == ''">
115+
<Digest_Authentication_Available></Digest_Authentication_Available>
116+
</PropertyGroup>
117+
118+
<PropertyGroup Condition="'$(Windows_Authentication_Available)' == ''">
119+
<Windows_Authentication_Available></Windows_Authentication_Available>
120+
</PropertyGroup>
121+
122+
<PropertyGroup Condition="'$(ServiceUri)' == ''">
123+
<ServiceUri >localhost</ServiceUri >
124+
</PropertyGroup>
125+
126+
<PropertyGroup Condition="'$(ExplicitUserName)' == ''">
127+
<ExplicitUserName ></ExplicitUserName >
128+
</PropertyGroup>
129+
130+
<PropertyGroup Condition="'$(ExplicitPassword)' == ''">
131+
<ExplicitPassword ></ExplicitPassword >
132+
</PropertyGroup>
133+
134+
<PropertyGroup Condition="'$(SSL_Available)' == ''">
135+
<SSL_Available></SSL_Available>
136+
</PropertyGroup>
137+
138+
<!-- The default value of $(IncludeTestsWithIssues) is blank, which is equivalent fo 'false'.
139139
The check of $(WithCategories) preserves the convention used by other repo's where the
140140
keyword 'failing' inside $(WithCategories) asks that tests with [ActiveIssue] be run.
141141
Optionally, $(IncludeTestsWithIssues) can be a semicolon-separated list of issue numbers.
142142
Tests marked with an [Issue] whose issue number is in this list will be run rather than skipped.
143143
-->
144-
<PropertyGroup Condition="'$(IncludeTestsWithIssues)' == '' and $(WithCategories.ToLower().Contains('failing'))">
145-
<IncludeTestsWithIssues>true</IncludeTestsWithIssues>
146-
</PropertyGroup>
147-
144+
<PropertyGroup Condition="'$(IncludeTestsWithIssues)' == '' and $(WithCategories.ToLower().Contains('failing'))">
145+
<IncludeTestsWithIssues>true</IncludeTestsWithIssues>
146+
</PropertyGroup>
147+
148+
<PropertyGroup Condition="'$(RunWithCoreWCFService)' == ''">
149+
<RunWithCoreWCFService></RunWithCoreWCFService>
150+
</PropertyGroup>
148151
<!--
149152
GeneratedTestPropertiesFileName:
150153
The full path of the C# file that will be generated at build time to

Diff for: src/System.Private.ServiceModel/tests/Common/Infrastructure/testproperties.targets

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace Infrastructure.Common
5050
public static readonly string ExplicitPassword_PropertyName = "ExplicitPassword"%3B
5151
public static readonly string SSL_Available_PropertyName = "SSL_Available"%3B
5252
public static readonly string IncludeTestsWithIssues_PropertyName = "IncludeTestsWithIssues"%3B
53+
public static readonly string RunWithCoreWCFService_PropertyName = "RunWithCoreWCFService"%3B
5354
5455
static partial void Initialize(Dictionary<string, string> properties)
5556
{
@@ -86,6 +87,7 @@ namespace Infrastructure.Common
8687
properties["ExplicitPassword"] = "$(ExplicitPassword)"%3B
8788
properties["SSL_Available"] = "$(SSL_Available)"%3B
8889
properties["IncludeTestsWithIssues"] = "$(IncludeTestsWithIssues)"%3B
90+
properties["RunWithCoreWCFService"] = "$(RunWithCoreWCFService)"%3B
8991
}
9092
}
9193
}

Diff for: src/System.Private.ServiceModel/tests/Scenarios/Binding/Http/NetHttpBindingTests.4.0.0.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
using Infrastructure.Common;
88
using Xunit;
99

10-
public static class Binding_Http_NetHttpBindingTests
10+
public class Binding_Http_NetHttpBindingTests : ConditionalWcfTest
1111
{
1212
[WcfTheory]
13+
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
1314
[InlineData(NetHttpMessageEncoding.Binary)]
1415
[InlineData(NetHttpMessageEncoding.Text)]
1516
[InlineData(NetHttpMessageEncoding.Mtom)]

Diff for: src/System.Private.ServiceModel/tests/Scenarios/Binding/Http/NetHttpsBindingTests.4.1.0.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class Binding_Http_NetHttpsBindingTests : ConditionalWcfTest
1515
[InlineData(NetHttpMessageEncoding.Mtom)]
1616
[Issue(3572, OS = OSID.OSX)]
1717
[Condition(nameof(Root_Certificate_Installed),
18-
nameof(SSL_Available))]
18+
nameof(SSL_Available),
19+
nameof(Skip_CoreWCFService_FailedTest))]
1920
[OuterLoop]
2021
public static void DefaultCtor_NetHttps_Echo_RoundTrips_String(NetHttpMessageEncoding messageEncoding)
2122
{
@@ -82,7 +83,8 @@ public static void TransportWithMessageCredential_NotSupported_NetHttps()
8283
[WcfFact]
8384
[Issue(3572, OS = OSID.OSX)]
8485
[Condition(nameof(Root_Certificate_Installed),
85-
nameof(SSL_Available))]
86+
nameof(SSL_Available),
87+
nameof(Skip_CoreWCFService_FailedTest))]
8688
[OuterLoop]
8789
public static void NonDefaultCtor_NetHttps_Echo_RoundTrips_String()
8890
{

0 commit comments

Comments
 (0)