Crunch
About
Pricing
Documentation
News
Support
Download
Customer Login
Welcome Guest! To enable all features please
Login
or
Register
.
Forum
Active Topics
Search
Login
Register
Notification
Error
OK
NCrunch Forum
»
General Support
»
Build/Test Issues
»
File locking prevents a test from running
File locking prevents a test from running
Options
Previous Topic
Next Topic
angyan
#1
Posted :
Friday, June 23, 2017 5:25:25 AM(UTC)
Rank: Newbie
Groups: Registered
Joined: 6/23/2017(UTC)
Posts: 2
Location: United States of America
Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I am getting this error: The process cannot access the file '<Path>' because it is being used by another process. I assume that this is because of the parallel nature of NCrunch? How do I run unit tests that all try to load up a a single test file?
Back to top
User Profile
View All Posts by User
View Thanks
Remco
#2
Posted :
Friday, June 23, 2017 9:24:45 AM(UTC)
Rank: NCrunch Developer
Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145
Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.
This documentation page describes the parallel execution behaviour
in detail, along with ways in which you can control it.
Back to top
1 user thanked Remco for this useful post.
angyan
on 7/5/2017(UTC)
User Profile
View All Posts by User
View Thanks
johanohrn
#3
Posted :
Wednesday, July 5, 2017 8:36:52 AM(UTC)
Rank: Newbie
Groups: Registered
Joined: 5/2/2017(UTC)
Posts: 8
Location: Sweden
Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
If you have control of the read operation I suggest you change it so that it does not exclusively lock the file. That way other threads/processes are free to read it in parallel.
Back to top
1 user thanked johanohrn for this useful post.
angyan
on 7/5/2017(UTC)
User Profile
View All Posts by User
View Thanks
angyan
#4
Posted :
Wednesday, July 5, 2017 2:58:59 PM(UTC)
Rank: Newbie
Groups: Registered
Joined: 6/23/2017(UTC)
Posts: 2
Location: United States of America
Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I was able to get it working. I actually was not closing the file as well after reading it and once I fixed this, the tests work well.
Back to top
1 user thanked angyan for this useful post.
Remco
on 7/5/2017(UTC)
User Profile
View All Posts by User
View Thanks
Users browsing this topic
Guest
NCrunch Forum
»
General Support
»
Build/Test Issues
»
File locking prevents a test from running
Forum Jump
General Support
- Setup Problems
- Build/Test Issues
- Daily Usage Issues
Crunch Discussion
- General Feedback
- Feature Suggestions
General Discussion
- General Discussion
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
Watch this topic
Email this topic
Print this topic
» Normal
Threaded
YAF
|
YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download