NXP-14007: Fix randomness failure on unit test when checking for number of pending docs or command that depends on how fast the async work is done