Skip to content

Hanging tests on single threaded Ubuntu environment #5308

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

Closed
JunTaoLuo opened this issue May 9, 2016 · 11 comments
Closed

Hanging tests on single threaded Ubuntu environment #5308

JunTaoLuo opened this issue May 9, 2016 · 11 comments

Comments

@JunTaoLuo
Copy link
Contributor

It seems like some tests in EF are hanging consistently on agent projectk-tc-ag6, see http://aspnetci/viewLog.html?buildId=90832&buildTypeId=XPlat_Linux_UbuntuUniverseCoreCLR&tab=buildLog#_focus=115519. I took a brief look at the test set up in https://github.com/aspnet/EntityFramework/blob/f732e3c7c1a680a944b9aafaf34bef88ed8a19c4/test/Microsoft.EntityFrameworkCore.FunctionalTests/DatabaseErrorLogStateTest.cs and it seems very similar to the problem I ran into in aspnet/Hosting#523. Probably needs some investigation.

@divega
Copy link
Contributor

divega commented May 9, 2016

One of the tests that is failing is DatabaseErrorLogStateTest.Query_logs_DatabaseErrorLogState_during_LINQ_enumeration_async which is a sync test that is testing an async query method with a Wait() at the end (so it is not very surprising that it hangs when running single threaded).

There are many more tests in the same class that use the same pattern. I am not sure there is a reason we haven't made the tests async. @anpete?

@anpete
Copy link
Contributor

anpete commented May 9, 2016

cc @rowanmiller who wrote this originally.

@anpete
Copy link
Contributor

anpete commented May 9, 2016

@divega I think the reason here is to DRY-up the result verification. Suggest we split async into different tests like we do usually. NB. I have seen this pattern in some of our other tests, too.

@rowanmiller rowanmiller modified the milestones: 1.0.0, 1.0.1 May 13, 2016
@rowanmiller rowanmiller self-assigned this Jul 1, 2016
@rowanmiller rowanmiller removed the pri0 label Jul 6, 2016
@rowanmiller rowanmiller modified the milestones: 1.2.0, 1.1.0-preview1 Oct 6, 2016
@divega
Copy link
Contributor

divega commented May 9, 2017

Talked to @smitpatel trying to figure out what the resolution was for this issue. We actually haven't changed these sync tests that invoke async APIs with .Wait() to be async, but these particular tests haven't hanged or deadlocked recently, hence "no repro". cc @anpete, @ajcvickers

@divega divega removed this from the 2.0.0-preview1 milestone May 9, 2017
@ajcvickers
Copy link
Contributor

@divega I would actually like to open this for backlog/cleanup. It's easy to write tests that can be run twice, once sync, once not, without using Wait. It would be good to cleanup all our tests to do that (where we need to test both sync/async). Let's discuss if you feel strongly it should remain closed.

@divega
Copy link
Contributor

divega commented May 9, 2017

@ajcvickers sounds great.

@divega
Copy link
Contributor

divega commented Jul 27, 2017

@smitpatel do you think we should do this clean up task now?

@smitpatel
Copy link
Contributor

Yes we should. It would be easy. And I suspect some day xUnit will start acting up seeing Wait()

@smitpatel
Copy link
Contributor

Note for implementer: Look at SqlServerDatabaseCreatorExistsTest which utilizes common method for sync/async both testing without using Wait()

@divega divega modified the milestones: 2.1.0-preview2, 2.1.0 Apr 2, 2018
@ajcvickers ajcvickers modified the milestones: 2.1.0, 2.2.0 Apr 8, 2018
@ajcvickers ajcvickers modified the milestones: 2.2.0, Backlog Apr 9, 2018
@ajcvickers ajcvickers modified the milestones: Backlog, 3.0.0 May 17, 2018
@AndriySvyryd AndriySvyryd modified the milestones: 3.0.0, 2.2.0 Jun 14, 2018
AndriySvyryd added a commit that referenced this issue Jun 14, 2018
Remove unnecessary async keywords
Postfix methods returning a Task with "Async"

Fixes #5308
AndriySvyryd added a commit that referenced this issue Jun 15, 2018
Remove unnecessary async keywords
Postfix methods returning a Task with "Async"

Fixes #5308
@AndriySvyryd AndriySvyryd removed their assignment Jun 15, 2018
@ajcvickers ajcvickers modified the milestones: 2.2.0-preview2, 2.2.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants