diff --git a/tests/unit/spawn_test.cc b/tests/unit/spawn_test.cc index c00912ee0c0..182756c4b5d 100644 --- a/tests/unit/spawn_test.cc +++ b/tests/unit/spawn_test.cc @@ -92,7 +92,7 @@ SEASTAR_TEST_CASE(test_spawn_echo) { }); } -SEASTAR_TEST_CASE(test_spawn_input) { +SEASTAR_TEST_CASE(test_spawn_input, *boost::unit_test::expected_failures(3)) { static const sstring text = "hello world\n"; return spawn_process("/bin/cat").then([] (auto process) { auto stdin = process.stdin(); @@ -101,12 +101,12 @@ SEASTAR_TEST_CASE(test_spawn_input) { return stdin.write(text).then([&stdin] { return stdin.flush(); }).handle_exception_type([] (std::system_error& e) { - testlog.error("failed to write to stdin: {}", e); + BOOST_TEST_ERROR(fmt::format("failed to write to stdin: {}", e)); return make_exception_future<>(std::move(e)); }).then([&stdout] { return stdout.read_exactly(text.size()); }).handle_exception_type([] (std::system_error& e) { - testlog.error("failed to read from stdout: {}", e); + BOOST_TEST_ERROR(fmt::format("failed to read from stdout: {}", e)); return make_exception_future>(std::move(e)); }).then([] (temporary_buffer echo) { BOOST_CHECK_EQUAL(sstring(echo.get(), echo.size()), text);