For Eng-6369, fix a broken testcase.

You don't need a lock if you are using a thread safe queue like LinkedBlockingQueue