Fix tests logic.

This commit is contained in:
levlam 2020-11-21 15:34:51 +03:00
parent 8a5569bf08
commit e8cd3d9af2

View File

@ -71,7 +71,7 @@ TEST(Mtproto, GetHostByNameActor) {
}
});
cnt++;
send_closure(actor_id, &GetHostByNameActor::run, host, 443, prefer_ipv6, std::move(promise));
send_closure_later(actor_id, &GetHostByNameActor::run, host, 443, prefer_ipv6, std::move(promise));
};
std::vector<std::string> hosts = {"127.0.0.2",
@ -177,11 +177,13 @@ TEST(Mtproto, config) {
run(get_simple_config_firebase_firestore, false);
}
cnt--;
sched.start();
while (sched.run_main(10)) {
// empty;
if (cnt != 0) {
sched.start();
while (sched.run_main(10)) {
// empty;
}
sched.finish();
}
sched.finish();
}
TEST(Mtproto, encrypted_config) {