diff --git a/tests/standalone/Log/Sinks.cpp b/tests/standalone/Log/Sinks.cpp index 4883d33..e8b02e0 100644 --- a/tests/standalone/Log/Sinks.cpp +++ b/tests/standalone/Log/Sinks.cpp @@ -180,9 +180,14 @@ class RotatingFileLoggerTests : public Void::Testing::Fixture Void::Testing::Test open_factory_rejects_bad_path() { - auto r = - RotatingFileLogger::open("/this/path/does/not/exist/app.log"); - Void::Testing::expect(!r.has_value()); + const auto blocking_parent = dir / "not-a-directory"; + { + std::ofstream blocker{blocking_parent}; + blocker << "file blocks directory creation"; + } + const auto result = + RotatingFileLogger::open(blocking_parent / "app.log"); + Void::Testing::expect(!result.has_value()); } Void::Testing::Test async_rotation_under_load()