sync: simplify TestOncePanic

Follow-up to CL 137350043.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/141620043