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