diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-02 16:17:13 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-03 09:23:36 (GMT) |
commit | 61926772f3c628baefbfe61c28004ffb9ae2b175 (patch) | |
tree | 07e6623e831b0d4f2707e75316b81c1d96e137dd /tests | |
parent | 4948f4b188c6aa40e628d74d6d6fce747ee535bd (diff) | |
download | Qt-61926772f3c628baefbfe61c28004ffb9ae2b175.zip Qt-61926772f3c628baefbfe61c28004ffb9ae2b175.tar.gz Qt-61926772f3c628baefbfe61c28004ffb9ae2b175.tar.bz2 |
centralize removeServer() invocation for some more determinism
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index deabda6..12be540 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -113,8 +113,6 @@ tst_QLocalSocket::tst_QLocalSocket() #endif )) qWarning() << "lackey executable doesn't exists!"; - - QLocalServer::removeServer("tst_localsocket"); } tst_QLocalSocket::~tst_QLocalSocket() @@ -139,7 +137,13 @@ public: LocalServer() : QLocalServer() { connect(this, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); - }; + } + + bool listen(const QString &name) + { + removeServer(name); + return QLocalServer::listen(name); + } QList<int> hits; @@ -528,7 +532,7 @@ void tst_QLocalSocket::sendData() // QLocalSocket/Server can take a name or path, check that it works as expected void tst_QLocalSocket::fullPath() { - QLocalServer server; + LocalServer server; QString name = "qlocalsocket_pathtest"; #if defined(QT_LOCALSOCKET_TCP) QString path = "QLocalServer"; @@ -822,7 +826,7 @@ void tst_QLocalSocket::removeServer() void tst_QLocalSocket::recycleServer() { - QLocalServer server; + LocalServer server; QLocalSocket client; QVERIFY(server.listen("recycletest1")); |