Skip to content

Commit 66e6ab0

Browse files
Bump Microsoft.Owin from 4.0.0 to 4.2.2 in /test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Build.AspNet (#2703)
* Bump Microsoft.Owin Bumps [Microsoft.Owin](https://github.com/aspnet/AspNetKatana) from 4.0.0 to 4.2.2. - [Release notes](https://github.com/aspnet/AspNetKatana/releases) - [Commits](aspnet/AspNetKatana@v4.0.0...v4.2.2) --- updated-dependencies: - dependency-name: Microsoft.Owin dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Fix issue related to Microsoft.Owin dependency upgrade Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Gathogo <john.gathogo@microsoft.com>
1 parent 8e983c4 commit 66e6ab0

5 files changed

Lines changed: 29 additions & 12 deletions

File tree

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Build.AspNet/App.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7171
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
7272
</dependentAssembly>
73+
<dependentAssembly>
74+
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
75+
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
76+
</dependentAssembly>
7377
</assemblyBinding>
7478
</runtime>
7579
</configuration>

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Build.AspNet/Microsoft.Test.E2E.AspNet.OData.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
<HintPath>..\..\..\..\sln\packages\Microsoft.Data.OData.5.8.4\lib\net40\Microsoft.Data.OData.dll</HintPath>
3636
<Private>True</Private>
3737
</Reference>
38+
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
39+
<HintPath>..\..\..\..\sln\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll</HintPath>
40+
<Private>True</Private>
41+
</Reference>
42+
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
43+
<HintPath>..\..\..\..\sln\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
44+
<Private>True</Private>
45+
</Reference>
3846
<Reference Include="Microsoft.OData.Client, Version=7.12.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
3947
<HintPath>..\..\..\..\sln\packages\Microsoft.OData.Client.7.12.2\lib\net45\Microsoft.OData.Client.dll</HintPath>
4048
<Private>True</Private>
@@ -47,8 +55,8 @@
4755
<HintPath>..\..\..\..\sln\packages\Microsoft.OData.Edm.7.12.2\lib\net45\Microsoft.OData.Edm.dll</HintPath>
4856
<Private>True</Private>
4957
</Reference>
50-
<Reference Include="Microsoft.Owin, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<HintPath>..\..\..\..\sln\packages\Microsoft.Owin.4.0.0\lib\net451\Microsoft.Owin.dll</HintPath>
58+
<Reference Include="Microsoft.Owin, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
59+
<HintPath>..\..\..\..\sln\packages\Microsoft.Owin.4.2.2\lib\net45\Microsoft.Owin.dll</HintPath>
5260
<Private>True</Private>
5361
</Reference>
5462
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Build.AspNet/packages.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.2" targetFramework="net45" />
1010
<package id="Microsoft.Data.Edm" version="5.8.4" targetFramework="net452" />
1111
<package id="Microsoft.Data.OData" version="5.8.4" targetFramework="net452" />
12+
<package id="Microsoft.Extensions.DependencyInjection" version="1.0.0" targetFramework="net452" />
13+
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0" targetFramework="net452" />
1214
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net45" />
1315
<package id="Microsoft.OData.Client" version="7.12.2" targetFramework="net452" />
1416
<package id="Microsoft.OData.Core" version="7.12.2" targetFramework="net452" />
1517
<package id="Microsoft.OData.Edm" version="7.12.2" targetFramework="net452" />
16-
<package id="Microsoft.Owin" version="4.0.0" targetFramework="net452" />
18+
<package id="Microsoft.Owin" version="4.2.2" targetFramework="net452" />
1719
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
1820
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
1921
<package id="Microsoft.Spatial" version="7.12.2" targetFramework="net452" />
@@ -23,6 +25,7 @@
2325
<package id="Owin" version="1.0" targetFramework="net452" />
2426
<package id="System.Collections" version="4.3.0" targetFramework="net45" />
2527
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net45" />
28+
<package id="System.ComponentModel" version="4.0.1" targetFramework="net452" />
2629
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net45" />
2730
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net45" />
2831
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net45" />

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Common/Execution/Web.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</dependentAssembly>
4848
<dependentAssembly>
4949
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
50-
<bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
50+
<bindingRedirect oldVersion="1.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
5151
</dependentAssembly>
5252
<dependentAssembly>
5353
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Common/Execution/WebHostTestFixture.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
using Microsoft.Test.E2E.AspNet.OData.Common.Extensions;
3636
using Owin;
3737
using Xunit;
38+
using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>;
3839
#endif
3940

4041
// Parallelism in the test framework is a feature that is new for (Xunit) version 2. However,
@@ -424,20 +425,21 @@ public void OnActionExecuting(ActionExecutingContext context)
424425
private void DefaultKatanaConfigure(IAppBuilder app)
425426
{
426427
// Set default principal to avoid OWIN selfhost bug with VS debugger
427-
app.Use(async (context, next) =>
428+
app.Use(new Func<AppFunc, AppFunc>(next => async env =>
428429
{
429430
Thread.CurrentPrincipal = null;
430-
await next();
431-
});
431+
await next.Invoke(env);
432+
}));
432433

433-
// Inject error logging for 500.
434434
WebHostLogExceptionFilter exceptionFilter = new WebHostLogExceptionFilter();
435-
app.Use(async (context, next) =>
435+
436+
// Inject error logging for 500.
437+
app.Use(new Func<AppFunc, AppFunc>(next => async env =>
436438
{
437-
await next();
439+
await next.Invoke(env);
438440

439441
int[] printExceptionFor = new int[] { 400, 500 };
440-
if (printExceptionFor.Contains(context.Response.StatusCode) &&
442+
if (printExceptionFor.Contains((int)env["owin.ResponseStatusCode"]) &&
441443
exceptionFilter.Exceptions.Count > 0)
442444
{
443445
Console.WriteLine("**************** Internal Server Error ****************");
@@ -456,7 +458,7 @@ private void DefaultKatanaConfigure(IAppBuilder app)
456458
Console.WriteLine();
457459
exceptionFilter.Exceptions.Clear();
458460
}
459-
});
461+
}));
460462

461463
var configuration = new WebRouteConfiguration();
462464
configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

0 commit comments

Comments
 (0)