Tests fail with IOException: Too many open files
Bug #993247 reported by
Eberhard Beilharz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit V2 |
Fix Released
|
High
|
Eberhard Beilharz |
Bug Description
When I run the unit tests of our project on Linux they fail with an IOException: Too many open files. The tests work fine on Windows, and they work if I run them fixture by fixture, or if I run them in the GUI.
Related branches
Changed in nunitv2: | |
milestone: | none → 2.6.1 |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It turns out that AssemblyReader opens a dll and closes it in AssemblyReader. Dispose. However, AssemblyResolver that creates AssemblyReader never disposes it, so the files stays open until eventually GC calls Dispose. On Linux this causes us to eventually run out of file handles.
Attached is a suggested fix. I did not include a unit test because I don't know how I could test this specific scenario.