Skip to content

Commit 7938f78

Browse files
committed
chore: formatting
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
1 parent c1dc81f commit 7938f78

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
161161
- name: C++ Unit Tests
162162
run: |
163-
${GITHUB_WORKSPACE}/tools/fauly_io.sh create
163+
${GITHUB_WORKSPACE}/tools/faulty_io.sh create
164164
165165
cd ${GITHUB_WORKSPACE}/build
166166
echo Run ctest -V -L DFLY
@@ -198,7 +198,7 @@ jobs:
198198
timeout 5m ./json_family_test --jsonpathv2=false
199199
timeout 5m ./tiered_storage_test --vmodule=db_slice=2 --logtostderr
200200
201-
${GITHUB_WORKSPACE}/tools/fauly_io.sh remove
201+
${GITHUB_WORKSPACE}/tools/faulty_io.sh remove
202202
203203
- name: Upload unit logs on failure
204204
if: failure()

src/server/tiering/disk_storage_test.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ struct DiskStorageTest : public PoolTestBase {
3939
pending_ops_++;
4040
auto buf = make_shared<string>(value);
4141
storage_->Stash(io::Buffer(*buf), [this, index, buf](io::Result<DiskSegment> segment) {
42-
if (segment.has_value())
42+
if (segment.has_value()) {
4343
EXPECT_GT(segment->length, 0u);
44+
}
4445
segments_[index] = segment;
4546
pending_ops_--;
4647
});
@@ -49,8 +50,8 @@ struct DiskStorageTest : public PoolTestBase {
4950
void Read(size_t index) {
5051
pending_ops_++;
5152
storage_->Read(*segments_[index], [this, index](io::Result<string_view> value) {
52-
last_reads_[index] = value.has_value() ?
53-
io::Result<string>(*value) : nonstd::make_unexpected(value.error());
53+
last_reads_[index] =
54+
value.has_value() ? io::Result<string>(*value) : nonstd::make_unexpected(value.error());
5455
pending_ops_--;
5556
});
5657
}
@@ -127,10 +128,9 @@ TEST_F(DiskStorageTest, ReUse) {
127128
});
128129
}
129130

130-
131131
TEST_F(DiskStorageTest, FlakyDevice) {
132-
//if (!filesystem::exists("/mnt/tiering_flaky"))
133-
// GTEST_SKIP() << "Flaky device not created, use tools/faulty_io.sh";
132+
// if (!filesystem::exists("/mnt/tiering_flaky"))
133+
// GTEST_SKIP() << "Flaky device not created, use tools/faulty_io.sh";
134134

135135
pp_->at(0)->Await([this] {
136136
auto ec = Open("/mnt/tiering_flaky/backing");
@@ -150,7 +150,7 @@ TEST_F(DiskStorageTest, FlakyDevice) {
150150
errors += (!segments_[i].has_value());
151151
EXPECT_GT(errors, 0);
152152
EXPECT_LT(errors, kEntries);
153-
153+
154154
Close();
155155
});
156156
}

tools/faulty_io.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Utility script for creating block devices with fault injection to test tiering
44
#
55
if [[ $EUID -ne 0 ]]; then
6-
echo "This script must be run as root"
6+
echo "This script must be run as root"
77
exit 1
88
fi
99

@@ -38,9 +38,9 @@ then
3838
dmsetup remove_all
3939
losetup -a | grep tiering | awk -F ':' '{print $1}'| xargs losetup --detach
4040
rm ./tiering_backing
41-
else
41+
else
4242
echo """Devices created by this script:
43-
1. /mnt/tiering_flaky_1 - flaky device with 1:1 second success/error intervals
43+
1. /mnt/tiering_flaky_1 - flaky device with 1:1 second success/error intervals
4444
4545
use with either create/remove arguments"""
4646
fi

0 commit comments

Comments
 (0)