Filesystem locks on mocha.json persist and break builds

Issue #24 resolved
Joe Bauser created an issue

When using the mocha test parser on a bamboo install running in a windows environment, a file lock persists on the test results file and prevents future builds from ever running.

17-Oct-2014 09:24:49    
17-Oct-2014 09:24:49    fs.js:771
17-Oct-2014 09:24:49      return binding.unlink(pathModule._makeLong(path));
17-Oct-2014 09:24:49                     ^
17-Oct-2014 09:24:49    Error: EBUSY, resource busy or locked 'C:\Bamboo-Agent-Home\xml-data\build-dir\LIMESTONE-MAT-MAT\organization-service\src\Calero.Organization.WebService.Acceptance.Tests\mocha.json'
17-Oct-2014 09:24:49        at Object.fs.unlinkSync (fs.js:771:18)
17-Oct-2014 09:24:49        at Runner.<anonymous> (C:\Bamboo-Agent-Home\xml-data\build-dir\LIMESTONE-MAT-MAT\organization-service\src\Calero.Organization.WebService.Acceptance.Tests\node_modules\mocha-bamboo-reporter\lib\bamboo.js:53:10)
17-Oct-2014 09:24:49        at Runner.emit (events.js:117:20)
17-Oct-2014 09:24:49        at Runner.run (C:\Bamboo-Agent-Home\xml-data\build-dir\LIMESTONE-MAT-MAT\organization-service\src\Calero.Organization.WebService.Acceptance.Tests\node_modules\mocha\lib\runner.js:593:8)
17-Oct-2014 09:24:49        at Mocha.run (C:\Bamboo-Agent-Home\xml-data\build-dir\LIMESTONE-MAT-MAT\organization-service\src\Calero.Organization.WebService.Acceptance.Tests\node_modules\mocha\lib\mocha.js:406:17)
17-Oct-2014 09:24:49        at Object.<anonymous> (C:\Bamboo-Agent-Home\xml-data\build-dir\LIMESTONE-MAT-MAT\organization-service\src\Calero.Organization.WebService.Acceptance.Tests\node_modules\mocha\bin\_mocha:380:16)
17-Oct-2014 09:24:49        at Module._compile (module.js:456:26)
17-Oct-2014 09:24:49        at Object.Module._extensions..js (module.js:474:10)
17-Oct-2014 09:24:49        at Module.load (module.js:356:32)
17-Oct-2014 09:24:49        at Function.Module._load (module.js:312:12)
17-Oct-2014 09:24:49        at Function.Module.runMain (module.js:497:10)
17-Oct-2014 09:24:49        at startup (node.js:119:16)
17-Oct-2014 09:24:49        at node.js:906:3

We've already tried deleting the mocha.json file before the test run, but because the file lock persists we can't remove the file manually until the atlassian worker wrapper has been killed and restarted, causing the lock to be removed.

This bug prevents us from using the plugin to parse our test results. We're currently looking for a work-around or for a solution to the problem.

Comments (4)

  1. Log in to comment