Test rewritten to use many threads

Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>