Skip to content

Commit f401f17

Browse files
committed
Fix test_shm_manager.cpp test
It wrongly assumed that the only possible segment type is PosixSysV segment.
1 parent 6b4f46b commit f401f17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cachelib/shm/tests/test_shm_manager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ void ShmManagerTest::testShutDown(bool posix) {
797797
ASSERT_NO_THROW(s.createShm(seg2, seg2Size, nullptr, seg2Opt));
798798
ASSERT_EQ(s.getShmByName(seg2).getSize(), seg2Size);
799799
auto *v = std::get_if<PosixSysVSegmentOpts>(&s.getShmTypeByName(seg2));
800-
ASSERT_TRUE(v);
801-
ASSERT_EQ(v->usePosix, posix);
800+
if (v)
801+
ASSERT_EQ(v->usePosix, posix);
802802

803803
ASSERT_TRUE(s.shutDown() == ShutDownRes::kSuccess);
804804
};

0 commit comments

Comments
 (0)