MDL-47572 libraries: modify unittest to avoid random timing fail

Thanks to Nigel Cunningham