{"action":"created","issue":{"url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/176","repository_url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter","labels_url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/176/comments","events_url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/176/events","html_url":"https://github.com/etas/vs-boost-unit-test-adapter/issues/176","id":196455137,"number":176,"title":"Sharing violation on test.stdout.log and test.stderr.log","user":{"login":"gastart","id":13785378,"avatar_url":"https://avatars.githubusercontent.com/u/13785378?v=3","gravatar_id":"","url":"https://api.github.com/users/gastart","html_url":"https://github.com/gastart","followers_url":"https://api.github.com/users/gastart/followers","following_url":"https://api.github.com/users/gastart/following{/other_user}","gists_url":"https://api.github.com/users/gastart/gists{/gist_id}","starred_url":"https://api.github.com/users/gastart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gastart/subscriptions","organizations_url":"https://api.github.com/users/gastart/orgs","repos_url":"https://api.github.com/users/gastart/repos","events_url":"https://api.github.com/users/gastart/events{/privacy}","received_events_url":"https://api.github.com/users/gastart/received_events","type":"User","site_admin":false},"labels":[{"id":223596432,"url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":223596433,"url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-19T16:19:56Z","updated_at":"2016-12-22T11:01:05Z","closed_at":null,"body":"I am encountering situations where for some yet unknown reason another process is attaching to the test.stdout.log and the test.stderr.log of the files generated by the boost unit test executable.  This is of course causing that the test execution result to become undetermined.  If the user decides to run a batch of tests the whole batch goes in an undetermined state.\r\n\r\nThe log i have is \r\n\r\n> Executing:   -> [mytest01]\r\n> Exception caught while running test batch \\Bin\\Debug\\Win32\\i386\\bin\\BoostTest01.exe [mytest01] (The process cannot access the file 'C:\\Users\\gastart\\AppData\\Local\\Temp\\BoostTest01.exe.7096.6.test.stdout.log' because it is being used by another process.)\r\n\r\nI dunno if we can print out the process with which we are having the access violation violation with so in future we can troubleshoot such problems easier, so as not to have to resolve to other tools like process monitor.\r\n\r\nThe below settings in the runsettings are a workaround to the problem but they come with the expense of losing functionality.\r\n\r\n      <EnableStdOutRedirection>false</EnableStdOutRedirection>\r\n      <EnableStdErrRedirection>false</EnableStdErrRedirection>"},"comment":{"url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/comments/268776710","html_url":"https://github.com/etas/vs-boost-unit-test-adapter/issues/176#issuecomment-268776710","issue_url":"https://api.github.com/repos/etas/vs-boost-unit-test-adapter/issues/176","id":268776710,"user":{"login":"gastart","id":13785378,"avatar_url":"https://avatars.githubusercontent.com/u/13785378?v=3","gravatar_id":"","url":"https://api.github.com/users/gastart","html_url":"https://github.com/gastart","followers_url":"https://api.github.com/users/gastart/followers","following_url":"https://api.github.com/users/gastart/following{/other_user}","gists_url":"https://api.github.com/users/gastart/gists{/gist_id}","starred_url":"https://api.github.com/users/gastart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gastart/subscriptions","organizations_url":"https://api.github.com/users/gastart/orgs","repos_url":"https://api.github.com/users/gastart/repos","events_url":"https://api.github.com/users/gastart/events{/privacy}","received_events_url":"https://api.github.com/users/gastart/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T11:01:05Z","updated_at":"2016-12-22T11:01:05Z","body":"Hello @guwirth. I gave a quick look at the code and the log file seems to be opened via the methods [GetStandardOutput()](https://github.com/etas/vs-boost-unit-test-adapter/blob/master/BoostTestAdapter/Boost/Results/TestResultCollection.cs#L186) and [GetStandardError()](https://github.com/etas/vs-boost-unit-test-adapter/blob/master/BoostTestAdapter/Boost/Results/TestResultCollection.cs#L206).  The file is being opened in the ctor of [BoostTestResultOutputBase](https://github.com/etas/vs-boost-unit-test-adapter/blob/master/BoostTestAdapter/Boost/Results/BoostTestResultOutputBase.cs#L24)  \r\n\r\nI discussed the option of \"trying again\" with @netspiri before we discovered that the interim sleep would do.  The \"trying again\" option would require the user defining a number of retries and interim time between retries I guess.\r\n\r\nRegarding your second point as far as I know, the user has the option not to generate and process the stdout and stderr via the options\r\n\r\n```\r\n<EnableStdOutRedirection>false</EnableStdOutRedirection>\r\n<EnableStdErrRedirection>false</EnableStdErrRedirection>\r\n```\r\n\r\nAdditionally I think there might be crash situations of the boost unit test executable (for example dll not found) that might lead for the stdout, stderr to not be generated. "}}
{"actor":{"display_login":"gastart"}}