aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/direct_io_ut.cpp
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-02-10 16:46:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:29 +0300
commitf773626848a7c7456803654292e716b83d69cc12 (patch)
treedb052dfcf9134f492bdbb962cb6c16cea58e1ed3 /util/system/direct_io_ut.cpp
parentf43ab775d197d300eb67bd4497632b909cd7c2a5 (diff)
downloadydb-f773626848a7c7456803654292e716b83d69cc12.tar.gz
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/system/direct_io_ut.cpp')
-rw-r--r--util/system/direct_io_ut.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/system/direct_io_ut.cpp b/util/system/direct_io_ut.cpp
index 839c3de7ca..3a4839aa9b 100644
--- a/util/system/direct_io_ut.cpp
+++ b/util/system/direct_io_ut.cpp
@@ -21,7 +21,7 @@ Y_UNIT_TEST_SUITE(TDirectIoTestSuite) {
size_t writeCount = Min<size_t>(1 + RandomNumber<size_t>(1 << 10), data.ysize() - writePos);
file.Write(&data[writePos], sizeof(ui64) * writeCount);
writePos += writeCount;
- size_t readPos = RandomNumber(writePos);
+ size_t readPos = RandomNumber(writePos);
size_t readCount = RandomNumber(writePos - readPos);
UNIT_ASSERT_VALUES_EQUAL(
file.Pread(&readResult[0], readCount * sizeof(ui64), readPos * sizeof(ui64)),
@@ -33,7 +33,7 @@ Y_UNIT_TEST_SUITE(TDirectIoTestSuite) {
file.Finish();
TDirectIOBufferedFile fileNew(FileName_, RdOnly | Direct | Seq | OpenAlways, 1 << 15);
for (int i = 0; i < 1000; ++i) {
- size_t readPos = RandomNumber(data.size());
+ size_t readPos = RandomNumber(data.size());
size_t readCount = RandomNumber(data.size() - readPos);
UNIT_ASSERT_VALUES_EQUAL(
fileNew.Pread(&readResult[0], readCount * sizeof(ui64), readPos * sizeof(ui64)),