Skip to content

Commit a739955

Browse files
authored
test(c/driver_manager): Make DriverManifest::SetUp more resilient (#3251)
This fixes an occasional issue with the SetUp block of the DriverManifest fixture. At least on my macOS system, if a previous test runs fails before running TearDown, SetUp would fail on this assertion. This changes the SetUp behavior so it re-uses the temporary directory.
1 parent ba7f993 commit a739955

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

c/driver_manager/adbc_driver_manager_test.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,8 @@ class DriverManifest : public ::testing::Test {
414414
}},
415415
};
416416

417-
auto temp_path = std::filesystem::temp_directory_path();
418-
temp_path /= "adbc_driver_manager_test";
419-
420-
ASSERT_TRUE(std::filesystem::create_directories(temp_path));
421-
temp_dir = temp_path;
417+
temp_dir = std::filesystem::temp_directory_path() / "adbc_driver_manager_test";
418+
std::filesystem::create_directories(temp_dir);
422419
#endif
423420
}
424421

0 commit comments

Comments
 (0)