For Eng-6369, fix a broken testcase.

This is a bug in a multi-threaded scenaraio because isEmpty can return true and then a different thread empties the queue.

The right way to do this loop is
ProcedureCallback callback = null;
while ((callback = m_callbacks.poll()) != null) {
//Do stuff
}