454
464
auto ctrl = scope->search("test", SearchMetadata("unused", "unused"), receiver);
455
465
// Allow some time for the search message to get there.
456
466
this_thread::sleep_for(chrono::milliseconds(100));
457
468
// search() in the scope doesn't return for some time, so the cancel() that follows
458
469
// is sent to the "fake" QueryCtrlProxy.
460
471
receiver->wait_until_finished();
461
473
// The receiver receives its cancel from the client-side run time instead of the
462
474
// scope because the run time short-cuts sending the cancel locally instead
463
475
// of waiting for the cancel message from the scope. Allow some time for the
464
476
// cancel to reach the scope before shutting down the run time, so the scope
465
477
// can test that it received the cancel.
469
481
void scope_thread(Runtime::SPtr const& rt, string const& runtime_ini_file)