diff options
| author | levlam <levlam@telegram.org> | 2020-11-21 15:34:51 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2020-11-21 15:34:51 +0300 |
| commit | e8cd3d9af2bfce453ac804228d406c80f7517f3c (patch) | |
| tree | 76983e947fd3886c773c8982c4adb820b71dd20d /test/mtproto.cpp | |
| parent | 8a5569bf0890958fa5a1aab6f2b6602de1b04723 (diff) | |
Fix tests logic.
Diffstat (limited to 'test/mtproto.cpp')
| -rw-r--r-- | test/mtproto.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/mtproto.cpp b/test/mtproto.cpp index b7c528e6e..394f9ae47 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -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) { |
