function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pChan1412pChan1412 

Question on deployment to Production - unable_to_lock_row

Hi,

 

I have been facing 'unable_to_lock_row' exception when I run all classes (parallel or synchronous) in sandbox but when I run them individually (unit test or asynchronous), they pass. This is happening at lines where I am inserting new records (ContentVersion & User records) in test methods. But I don't have any trigger on User object hence no scope for recursion. I have a trigger on ContentVersion but not doing any DML operations in it and hence no scope for recursion here as well, but I still keep getting this error. Now, all I am worried about is when we deploy metadata from sandbox to production, do test classes run in parallel (synchronously) or are they run unit wise (asynchronously)? I use eclipse for deployment.

 

Please help!

 

Thanks,

Puneeth.