mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-18 08:22:06 +03:00
Fixed Ipc unit test intermittently fail #4721
This commit is contained in:
parent
1369f46cee
commit
9d44affc89
@ -67,6 +67,8 @@ IpcLogOutputter::~IpcLogOutputter()
|
||||
ARCH->closeMutex(m_bufferMutex);
|
||||
|
||||
if (m_bufferThread != nullptr) {
|
||||
m_bufferThread->cancel();
|
||||
m_bufferThread->wait();
|
||||
delete m_bufferThread;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,16 @@ public:
|
||||
MockIpcServer() :
|
||||
m_sendCond(ARCH->newCondVar()),
|
||||
m_sendMutex(ARCH->newMutex()) { }
|
||||
|
||||
~MockIpcServer() {
|
||||
if (m_sendCond != NULL) {
|
||||
ARCH->closeCondVar(m_sendCond);
|
||||
}
|
||||
|
||||
if (m_sendMutex != NULL) {
|
||||
ARCH->closeMutex(m_sendMutex);
|
||||
}
|
||||
}
|
||||
|
||||
MOCK_METHOD0(listen, void());
|
||||
MOCK_METHOD2(send, void(const IpcMessage&, EIpcClientType));
|
||||
|
Loading…
Reference in New Issue
Block a user