Batch requests are still failing on .NET Core 3.1 +
robertmclaws opened this issue · 2 comments
The batch unit tests are failing on .NET Core 3.1 and later. Right now, the issue is "unsupported media type" coming back from both XML and JSON posts. If we can get this fixed, we go from 40 failed tests to 28, and I believe we can finally get this thing to 1.0 GA.
@caldwell0414 @jspuij any chance you gents could pitch in on figuring this out? The tests are calling the right URLs now, we just need to make sure the processing pipeline is configured properly.
First issue is that, for .NET Core, we need to add the ODataBatch middleware. This must be done before calling UseMvc on the api builder.
In RestierBreakdanceTestBase, add builder.UseODataBatching() to line 78, immediately before useMvc:
builder.UseDeveloperExceptionPage();
**builder.UseODataBatching();**
builder.UseMvc(routeBuilder =>
...
The second issue, with the JSON tests, is that in .NET Core we return a slightly different content-type within the individual responses (we omit the odata.stream=true for the non-.NET Core). Not sure why this discrepancy, but both are valid so I made allowances in the test.
The final issue is that we appear to have a race condition with the way we process the changeset, such that some entries are not getting properly processed. I'm working on trying to track that one down.