add tests for sweeper thread-safeness