Skip to content

Commit b1a6030

Browse files
committed
test(compaction): make cross-filesystem working-dir test message-independent
- the cross-filesystem working_dir test asserted a specific error message ("failed to move blob directory"), but which cross-device operation trips first (manifest copy, blob move, or the final rename) is platform-dependent: CI failed at the manifest copy_file (EXDEV) before reaching the blob move - assert only that compaction fails and leaves the original log directory intact, not the specific message
1 parent 9da8622 commit b1a6030

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/limestone/compaction/offline_compaction_test.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,13 @@ TEST_F(offline_compaction_test, offline_compaction_fails_when_working_dir_is_on_
559559
std::string command = std::string(util_command) + " compaction --force --working_dir=" +
560560
working_dir.string() + " " + std::string(location) + " 2>&1";
561561
int rc = invoke(command, out);
562+
// Compaction must fail: a cross-filesystem working directory cannot work, because both
563+
// the carry-over of the log directory contents and the final rename(tmp, from_dir)
564+
// require the same filesystem. We only assert the failure and that the original log
565+
// directory is left intact, not a specific message: which cross-device operation trips
566+
// first (carrying over the manifest, moving the blob directory, or the final rename)
567+
// depends on the platform's copy/rename behavior.
562568
EXPECT_NE(rc, 0) << "compaction should fail on a cross-filesystem working directory";
563-
EXPECT_NE(out.find("failed to move blob directory"), std::string::npos)
564-
<< "tglogutil output:\n" << out;
565569

566570
// The failure must leave the original log directory untouched.
567571
EXPECT_TRUE(boost::filesystem::exists(blob_path));

0 commit comments

Comments
 (0)