Skip to content

Commit

Permalink
Update FileTest.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kewang1024 committed Apr 19, 2024
1 parent 66d3ecb commit a68bdfa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions velox/common/file/tests/FileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,16 +669,16 @@ TEST_F(FaultyFsTest, fileWriteFaultHookInjection) {

// Set to not delegate.
fs_->setFileInjectionHook([&](FaultFileOperation* op) {
// Only inject for write.
if (op->type != FaultFileOperation::Type::kWrite) {
return;
}
// Only inject for path2.
if (op->path != path2) {
return;
}
auto* writeOp = static_cast<FaultFileWriteOperation*>(op);
writeOp->delegate = false;
// Only inject for write.
if (op->type != FaultFileOperation::Type::kWrite) {
return;
}
// Only inject for path2.
if (op->path != path2) {
return;
}
auto* writeOp = static_cast<FaultFileWriteOperation*>(op);
writeOp->delegate = false;
});
{
auto writeFile = fs_->openFileForWrite(path1, {});
Expand Down

0 comments on commit a68bdfa

Please sign in to comment.