test if a waitgroup can raises

in the process fix AtomicLong to correctly handle negative integers.