From 8a3ac0348a7af8475842f3c84e254ca3bf545575 Mon Sep 17 00:00:00 2001 From: equalsraf Date: Fri, 1 Jul 2022 23:26:35 +0100 Subject: [PATCH] Make connector test non-flaky Rerunning the connector test will fail if the socket file already exists. --- test/tst_neovimconnector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/tst_neovimconnector.cpp b/test/tst_neovimconnector.cpp index 480284fb4..60307e57c 100644 --- a/test/tst_neovimconnector.cpp +++ b/test/tst_neovimconnector.cpp @@ -104,6 +104,7 @@ private slots: void connectToSocket() { QFETCH(QString, socketname); + QDir().remove(socketname); // Start nvim QProcess p; p.setProgram("nvim"); @@ -120,7 +121,7 @@ private slots: qDebug() << c->connectionDescription(); QSignalSpy onReady(c, SIGNAL(ready())); QVERIFY(onReady.isValid()); - QVERIFY(SPYWAIT(onReady)); + QVERIFY(SPYWAIT(onReady, 5000 /*msec*/)); QCOMPARE(c->connectionType(), NeovimConnector::SocketConnection); }