Fix for locking issues in redmine/6334

I suspect you need s/work/works/ here, but I don't understand what you're saying.
Does it "work" in the sense that the test passes, that the abort triggers or some other sense ?
Does it do so "always" in the sense of on all runs or do you mean it works even before your fix ?