Skip to content

Commit c253f4a

Browse files
authored
Re-enable TelemetryConsumptionWorks test (#1994)
1 parent b311ca7 commit c253f4a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/ReverseProxy.FunctionalTests/TelemetryConsumptionTests.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,18 @@ private static void VerifyStages(string[] expected, List<(string Stage, DateTime
9999
}
100100
}
101101

102-
[Theory (Skip = "https://github.com/microsoft/reverse-proxy/issues/1881")]
102+
[Theory]
103103
[InlineData(RegistrationApproach.WithInstanceHelper)]
104104
[InlineData(RegistrationApproach.WithGenericHelper)]
105105
[InlineData(RegistrationApproach.Manual)]
106106
public async Task TelemetryConsumptionWorks(RegistrationApproach registrationApproach)
107107
{
108+
var useHttpsOnDestination = !OperatingSystem.IsMacOS();
109+
108110
var test = new TestEnvironment(
109111
async context => await context.Response.WriteAsync("Foo"))
110112
{
111-
UseHttpsOnDestination = true,
113+
UseHttpsOnDestination = useHttpsOnDestination,
112114
ClusterId = Guid.NewGuid().ToString(),
113115
ConfigureProxy = proxyBuilder => RegisterTelemetryConsumers(proxyBuilder.Services, registrationApproach),
114116
};
@@ -144,6 +146,11 @@ await test.Invoke(async uri =>
144146
"OnRequestStop-Kestrel"
145147
};
146148

149+
if (!useHttpsOnDestination)
150+
{
151+
expected = expected.Where(s => !s.Contains("OnHandshake", StringComparison.Ordinal)).ToArray();
152+
}
153+
147154
foreach (var consumerType in new[] { typeof(TelemetryConsumer), typeof(SecondTelemetryConsumer) })
148155
{
149156
Assert.True(TelemetryConsumer.PerClusterTelemetry.TryGetValue((test.ClusterId, consumerType), out var stages));

0 commit comments

Comments
 (0)