Repository navigation
FS improvements for unit tests - #114026
Conversation
…to the fixture directory even after the test signals completion
|
Actually there is more to it. It looks like an Again it is the |
|
OK. This test is just really really annoying and I begin to understand how messy getting a good outcome is. Even retrying 5 times to delete the fixture directory fails sometimes -- https://dev.azure.com/monacotools/Monaco/_build/results?buildId=99749&view=logs&j=672276a2-8d3a-5fab-615d-090c51352f92&t=6ad30dce-518e-54c1-94da-00d19cce9354&l=7718: |
|
I owe you a 🍺 for this one. |
Towards fixing #114024
rimrafwith theMOVEoption.errorbeing ignored herevscode/src/vs/base/node/pfs.ts
Line 96 in 6d2e0aa
graceful-fsin our unit tests causes some tests which are unlucky and are not first in the mocha runner schedule to fail in their teardown hookflakyTest)This PR aims to expose the tests which write to the fixture directory even after the test has signaled completion. By using
rimrafwith theUNLINKoption, any error will immediately become visible. I have already seen aENOTEMPTYbeing thrown from theBackupTrackertest. The best fix would be for the tests to be analyzed and repaired to stop writing to the fixture directory after they signal completion. The bandaid approach that I have started is to leave a TODO in the test and to userimrafWithRetriesespecially in these tests where thisENOTEMPTYis observed.