How do you test if your locking works. I am thinking of just creating a unit test to spawn off a few threads that call the updateRecord(recNo, data) (which encapsulates the lock and unlock) function using the same recNo for both threads. Would this suffice ?
posted 9 years ago
there is a post under the name"junit test cases"
it has a pretty good test cases which most people have used and commented on. I guess that would help. But havent reached there yet myself.