DEV: prevents random test failure (PR #10445)

GitHub

This clearPromise seems like a custom way to cancel the search if it takes too long. I think it might be better to not execute this code at all in test mode rather than give it 5 seconds:

let clearPromise;                                             
if (!isTesting()) {                                           
  clearPromise = later(() => resolve(CANCELLED_STATUS), 5000);
}                                                             

thoughts?

Yes probably better indeed, chances a search timeouts in test seem low and probably something we could fix