Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch requests are still failing on .NET Core 3.1 + #709

Closed
robertmclaws opened this issue Apr 11, 2022 · 2 comments
Closed

Batch requests are still failing on .NET Core 3.1 + #709

robertmclaws opened this issue Apr 11, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@robertmclaws
Copy link
Collaborator

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.

@robertmclaws robertmclaws added this to the 1.0 milestone Apr 11, 2022
@robertmclaws
Copy link
Collaborator Author

@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.

@mikepizzo
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants