forked from Kistler-Group/sdbus-cpp
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)
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user