I’m preparing for performance tests and creating new test cases.
So I was just testing one test case, running it on a server I can only access and I just got:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction
Application I want to test is a backend. There’s no view, no sessions, it’s REST-like [every request contains everything needed to perform the task].
I was testing single API over and over for a single user. Request comes, service does it’s work, response is sent back, I analyze the response and send another request to the same API for the same user.
As I mentioned – objects are not stored in session. Every time request comes I’m doing User.get(id from params).
Currently I’m running this app on Postgres 8.4.4. Server is quite powerful and currently has no load at all on it.
It seems to me, that I’m able to receive response from the app [server is remote], analyze it and send another request back before transaction is saved. This is quite odd.
Is there anything I’m missing here? What should I do about it?
In the end we figured out it was caused by our test tool – SoapUI. This damn thing can send 2 requests one after another. It is a documented bug, lot of talk on their forums about it.
We dumped soapui and wrote ourselves a small testing tool. Now it works like a charm.