Improve some of the spinlocks in the tests