From 8a4056fc59c8ead57609799a8121b85aa8f5906d Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 10 Sep 2020 11:36:23 -0400 Subject: [PATCH] Fix #873, Add test for SB subscribe/unsubscribe/unsubscribe --- fsw/cfe-core/unit-test/sb_UT.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fsw/cfe-core/unit-test/sb_UT.c b/fsw/cfe-core/unit-test/sb_UT.c index 98de8a255..1cf45fe4e 100644 --- a/fsw/cfe-core/unit-test/sb_UT.c +++ b/fsw/cfe-core/unit-test/sb_UT.c @@ -2456,6 +2456,12 @@ void Test_Unsubscribe_Basic(void) EVTSENT(CFE_SB_SUBSCRIPTION_RCVD_EID); + /* Check unsubscribe after unsubscribe produces event */ + UT_ClearEventHistory(); + ASSERT(CFE_SB_Unsubscribe(MsgId, TestPipe)); + EVTCNT(2); + EVTSENT(CFE_SB_UNSUB_NO_SUBS_EID); + TEARDOWN(CFE_SB_DeletePipe(TestPipe)); } /* end Test_Unsubscribe_Basic */