From 8a714b77eab4644371cc04da1fe8e7bc1bc7952a Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Wed, 25 May 2022 11:40:12 +0000 Subject: fix undefined behavior in messagebus unit tests also avoids hanging/leaving processes after running all unit tests with UBSAN without recovery. --- messagebus/src/tests/messageordering/messageordering.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'messagebus/src/tests') diff --git a/messagebus/src/tests/messageordering/messageordering.cpp b/messagebus/src/tests/messageordering/messageordering.cpp index 919d242fc47..e82e58d1730 100644 --- a/messagebus/src/tests/messageordering/messageordering.cpp +++ b/messagebus/src/tests/messageordering/messageordering.cpp @@ -155,6 +155,7 @@ Test::Main() ssp.setTimeout(400s); SourceSession::UP ss = srcNet.mb.createSourceSession(src, ssp); DestinationSession::UP ds = dstNet.mb.createDestinationSession("session", true, dst); + dst.setDestinationSession(*ds); ASSERT_EQUAL(400s, ssp.getTimeout()); // wait for slobrok registration -- cgit v1.2.3