Skip to content
Advertisement

CA Rally – Concurrency conflict: [Object has been modified since being read for update in this context] Error

I have an array of testcases that I am attempting to add to a testset in Rally using the rally api’s.

I iterate through the array and call this method for every testcase in the array. They are all being added to the same testset.

JavaScript

I get the following error quite a bit and the process fails

JavaScript

Has anyone else run into this issues and know what I can do to ensure I don’t get it.

Advertisement

Answer

Rather than looping and adding the test cases one at a time, can you add them in a batch?

JavaScript

Note, this approach is limited to 25 records per batch I think, so depending on how much data you’re generally associating to a test set you may have to break it up into chunks of 25.

The other thing to check, is are you using the same rallyApi instance for each of the calls? From your code it seems like it. As long as this is true, and as long as cookies are enabled I think you should be pinned to the same app server for all your requests and shouldn’t be seeing these exceptions (which are usually caused by quick updates to related objects during background cache syncing across all the server nodes).

You can also try adding this config when newing up your rallyApi instance:

JavaScript

That should ensure your requests are maintaining cookies.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement