diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-29 19:03:55 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-29 19:04:03 +0300 |
commit | cebfc5c8facbf6ae335499f7f4b3dc57a60af999 (patch) | |
tree | 4c39e613c87f6164df1fe80601e611987aaaec84 /protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp | |
parent | 189164bebda4bca9bb3d672500d844bfe7f26517 (diff) |
TDLIB update up to the current state
Diffstat (limited to 'protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp')
-rw-r--r-- | protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp b/protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp index 029a4ff366..f93a718138 100644 --- a/protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp +++ b/protocols/Telegram/tdlib/td/tdutils/test/ChainScheduler.cpp @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -116,7 +116,7 @@ TEST(ChainScheduler, Stress) { td::vector<QueryWithParents> active_queries; td::ChainScheduler<QueryPtr> scheduler; - td::vector<td::vector<QueryPtr>> chains(ChainsN); + td::vector<td::vector<QueryPtr>> chains(ChainsN + 1); int inflight_queries{}; int current_query_id{}; int sent_cnt{}; @@ -138,7 +138,7 @@ TEST(ChainScheduler, Stress) { query->id = query_id; int chain_n = rnd.fast(1, ChainsN); td::vector<ChainId> chain_ids(ChainsN); - std::iota(chain_ids.begin(), chain_ids.end(), 0); + std::iota(chain_ids.begin(), chain_ids.end(), 1); td::rand_shuffle(td::as_mutable_span(chain_ids), rnd); chain_ids.resize(chain_n); for (auto chain_id : chain_ids) { @@ -151,7 +151,7 @@ TEST(ChainScheduler, Stress) { }; auto check_parents_ok = [&](const QueryWithParents &query_with_parents) -> bool { - return td::all_of(query_with_parents.parents, [](auto &parent) { return parent->is_ok; }); + return td::all_of(query_with_parents.parents, [](const auto &parent) { return parent->is_ok; }); }; auto to_query_ptr = [&](TaskId task_id) { |