[autotests] Destroy a created ClientConnection
This commit is contained in:
parent
868282fb08
commit
67c45c1a4b
1 changed files with 7 additions and 1 deletions
|
@ -209,7 +209,10 @@ void TestWaylandConnectionThread::testConnectFd()
|
|||
using namespace KWayland::Server;
|
||||
int sv[2];
|
||||
QVERIFY(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) >= 0);
|
||||
QVERIFY(m_display->createClient(sv[0]));
|
||||
auto c = m_display->createClient(sv[0])
|
||||
QVERIFY(c);
|
||||
QSignalSpy disconnectedSpy(c, &ClientConnection::disconnected);
|
||||
QVERIFY(disconnectedSpy.isValid());
|
||||
|
||||
ConnectionThread *connection = new ConnectionThread;
|
||||
QSignalSpy connectedSpy(connection, SIGNAL(connected()));
|
||||
|
@ -237,6 +240,9 @@ void TestWaylandConnectionThread::testConnectFd()
|
|||
connectionThread->quit();
|
||||
connectionThread->wait();
|
||||
delete connectionThread;
|
||||
|
||||
c->destroy();
|
||||
QCOMPARE(disconnectedSpy.count(), 1);
|
||||
}
|
||||
|
||||
void TestWaylandConnectionThread::testConnectFdNoSocketName()
|
||||
|
|
Loading…
Reference in a new issue