Set and get atomic integer atomically.

Defer GinkgoRecover to ensure an assertion failure in a goroutine causes testcase failure.