Specs: test reliability & auto temp clean-up #13365

merged 2 commits into from Dec 1, 2016


None yet

2 participants

damieng commented Dec 1, 2016 edited

This started-off as trying to figure out why a few tests fail under Windows and indeed should fix a couple of them.

In doing so I decided to make the tests clean up after themselves so that;

  • I could see what was going on
  • Any resource leaks/locks would show up (there is at least 1 in libgit2/git-utils)
  • I didn't have to keep deleting %TEMP% (not automatic on Windows)
  • I could now run the specs against a small RAM disk instead (down from 4 minutes to 2)
damieng added some commits Dec 1, 2016
@damieng damieng Clean up temporary files when running specs 3fd1dbd
@damieng damieng Correct compile cache afterEach cleanup
@damieng damieng merged commit ff83e59 into master Dec 1, 2016

4 of 5 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
ci/circleci Your tests passed on CircleCI!
continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@damieng damieng deleted the dg-specs-reliability branch Dec 1, 2016
@@ -81,6 +82,7 @@ describe 'CompileCache', ->
error = new Error("Oops")
expect(error.stack).toBe 'a-stack-trace'
+ console.log('stack ' + error.getRawStack())
damieng Dec 1, 2016 Member

Oops, nice catch. This test was randomly failing without useful info so was logging it. Will remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment