From 189fd2374439e7d2bbfb12afbbc8facc438b985d Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 4 Oct 2023 13:48:51 +0000 Subject: [PATCH] fix(tests): fix ETIMEDOUT message on FreeBSD (#365) [ RUN ] SdbusTestObject/0.ThrowsTimeoutErrorWhenMethodTimesOut tests/integrationtests/DBusMethodsTests.cpp:181: Failure Value of: e.getMessage() Expected: (is equal to "Connection timed out") or (is equal to "Method call timed out") Actual: "Operation timed out" [ FAILED ] SdbusTestObject/0.ThrowsTimeoutErrorWhenMethodTimesOut, where TypeParam = sdbus::test::SdBusCppLoop (3 ms) --- tests/integrationtests/DBusMethodsTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrationtests/DBusMethodsTests.cpp b/tests/integrationtests/DBusMethodsTests.cpp index 43871d5..50f8dfb 100644 --- a/tests/integrationtests/DBusMethodsTests.cpp +++ b/tests/integrationtests/DBusMethodsTests.cpp @@ -180,7 +180,7 @@ TEST_F(SdbusTestObject, ThrowsTimeoutErrorWhenMethodTimesOut) catch (const sdbus::Error& e) { ASSERT_THAT(e.getName(), AnyOf("org.freedesktop.DBus.Error.Timeout", "org.freedesktop.DBus.Error.NoReply")); - ASSERT_THAT(e.getMessage(), AnyOf("Connection timed out", "Method call timed out")); + ASSERT_THAT(e.getMessage(), AnyOf("Connection timed out", "Operation timed out", "Method call timed out")); auto measuredTimeout = std::chrono::steady_clock::now() - start; ASSERT_THAT(measuredTimeout, Le(50ms)); }