Skip to content

Commit

Permalink
re-adding project reference (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettsam authored Sep 20, 2022
1 parent 8942aba commit 1da3c27
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
<Import Project="..\..\build\Common.props" />

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Core" Version="1.7.0-preview1" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DotNetWorker.Core\DotNetWorker.Core.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ public void AddingServiceAndLogger_OnlyAddsServicesOnce()

// Ensure that our Initializer and Module are added alongside the defaults
Assert.Collection(initializers,
t => Assert.Equal(typeof(FunctionsTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(AzureWebAppRoleEnvironmentTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(Microsoft.ApplicationInsights.WorkerService.TelemetryInitializers.DomainNameRoleInstanceTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(HttpDependenciesParsingTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(ComponentVersionTelemetryInitializer), t.ImplementationType));
t => Assert.Equal(typeof(FunctionsTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(AzureWebAppRoleEnvironmentTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(Microsoft.ApplicationInsights.WorkerService.TelemetryInitializers.DomainNameRoleInstanceTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(HttpDependenciesParsingTelemetryInitializer), t.ImplementationType),
t => Assert.Equal(typeof(ComponentVersionTelemetryInitializer), t.ImplementationType));

Assert.Collection(modules,
t => Assert.Equal(typeof(FunctionsTelemetryModule), t.ImplementationType),
Expand Down
3 changes: 3 additions & 0 deletions test/DotNetWorkerTests/ApplicationInsights/EndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public EndToEndTests()
.AddApplicationInsights(appInsightsOptions =>
{
appInsightsOptions.InstrumentationKey = "abc";
// keep things more deterministic for tests
appInsightsOptions.EnableAdaptiveSampling = false;
appInsightsOptions.EnableDependencyTrackingTelemetryModule = false;
})
.AddApplicationInsightsLogger();
Expand Down
6 changes: 6 additions & 0 deletions test/DotNetWorkerTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using Xunit;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

0 comments on commit 1da3c27

Please sign in to comment.