aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/online.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-02-26 14:22:31 +0300
committerlevlam <levlam@telegram.org>2023-02-26 14:22:31 +0300
commit22fdc0258be44f5e41d927752738473c8d3ff24f (patch)
tree4cafafb29e3ef60c7a1907feee7c4bd9eca36bd0 /test/online.cpp
parentffcc1719eff116a75861ff4a8596d7e2ffe213fb (diff)
Use "receive"/"have"/"loaded" instead of "got" and other log message improvements.
Diffstat (limited to 'test/online.cpp')
-rw-r--r--test/online.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/online.cpp b/test/online.cpp
index fd758129d..de7afa8a6 100644
--- a/test/online.cpp
+++ b/test/online.cpp
@@ -321,7 +321,7 @@ class UploadFile : public Task {
auto r_id = read_file(id_path_);
if (r_id.is_ok() && r_id.ok().size() > 10) {
auto id = r_id.move_as_ok();
- LOG(ERROR) << "Got file from cache";
+ LOG(ERROR) << "Receive file from cache";
Result res;
res.content = std::move(content_);
res.remote_id = id.as_slice().str();
@@ -437,12 +437,12 @@ class TestDownloadFile : public Task {
start_chunk();
}
- void got_chunk(const td_api::file &file) {
- LOG(ERROR) << "Got chunk";
+ void on_get_chunk(const td_api::file &file) {
+ LOG(ERROR) << "Receive chunk";
auto range = ranges_.back();
- std::string got_chunk(range.end - range.begin, '\0');
- FileFd::open(file.local_->path_, FileFd::Flags::Read).move_as_ok().pread(got_chunk, range.begin).ensure();
- CHECK(got_chunk == as_slice(content_).substr(range.begin, range.end - range.begin));
+ std::string received_chunk(range.end - range.begin, '\0');
+ FileFd::open(file.local_->path_, FileFd::Flags::Read).move_as_ok().pread(received_chunk, range.begin).ensure();
+ CHECK(received_chunk == as_slice(content_).substr(range.begin, range.end - range.begin));
ranges_.pop_back();
if (ranges_.empty()) {
promise_.set_value(Unit{});
@@ -455,7 +455,7 @@ class TestDownloadFile : public Task {
send_query(td::make_tl_object<td::td_api::downloadFile>(
file_id_, 1, static_cast<int64>(ranges_.back().begin),
static_cast<int64>(ranges_.back().end - ranges_.back().begin), true),
- [this](auto res) { got_chunk(*res.ok()); });
+ [this](auto res) { on_get_chunk(*res.ok()); });
}
};