Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > Database concurrency cond...

Database concurrency condition detected on testset update via SOAP api RSS Feed

Friday, February 10, 2012
We use SpiraTeam 3.1 at the moment and are experimenting with the SOAP API.

All goes fine, but 1 thing came up:
when performing a TestSet_Update to update the status (from eg not started to "in progress") all is ok.
when doing the same action again to set the status to yet another value we get:
Server raised fault: 'Database concurrency condition detected'

and very consistent. First time no problem, second time always the same error.

Is this a known issue or is there a workaround?

thx,
Filip
3 Replies
Adam SAdam S
re: Filip Baert on Friday, February 10, 2012
Friday, February 10, 2012
This is by design, you need to do a TestSet_RetrieveById first to get the refreshed data then call the TestSet_Update method. This ensures that you don't have outdated data.
Filip BaertFilip Baert
re: Adam S on Friday, February 10, 2012
Monday, February 13, 2012
ok, sounds reasonable, but unfortunately the RetrieveById does not solve the error.

this is the complete message from spirateam:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Database concurrency condition detected</faultstring><detail><ServiceFaultMessage xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Database concurrency condition detected</Message><StackTrace>   at Inflectra.SpiraTest.Business.TestSet.Update(TestSetData testSetDataSet, Int32 userId, Nullable`1 intRollbackId)&#xD;
   at Inflectra.SpiraTest.Web.Services.v3_0.ImportExport.TestSet_Update(RemoteTestSet remoteTestSet)</StackTrace><Type>DataAccessConcurrencyException</Type></ServiceFaultMessage></detail></s:Fault></s:Body></s:Envelope>


this is our python code:
  testSetToExecute = getTestSetToExecute(automationHostName)  =>> function gives 1 testset that meets specific filters.
  if(testSetToExecute is not None):
    testCasesToExecute = client.service.TestCase_RetrieveByTestSetId(testSetToExecute.TestSetId)
    testSetToExecute =client.service.TestSet_RetrieveById(testSetToExecute.TestSetId)
    testSetToExecute.TestSetStatusId = 2 #in progress
    testSetToExecute.TestSetStatusName = "In Progress"
    testSetToExecute.ExecutionDate = datetime.now()
    client.service.TestSet_Update(testSetToExecute)

the last line fails with given error.

thx for the help
Filip

Adam SAdam S
re: Filip Baert on Monday, February 13, 2012
Monday, February 27, 2012
Could it be that the LastUpdateDate is not being sent back correctly? That is what's used to verify that the data is current? Also do you have the latest patch for v3.1 applied?
Tagged
Statistics
  • Started: 2/10/2012
  • Last Reply: 2/27/2012
  • Replies: 3
  • Views: 775
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.