Skip to content

Commit 8a3ac03

Browse files
equalsrafequalsraf
authored andcommitted
Make connector test non-flaky
Rerunning the connector test will fail if the socket file already exists.
1 parent 075f5ea commit 8a3ac03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/tst_neovimconnector.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ private slots:
104104
void connectToSocket() {
105105
QFETCH(QString, socketname);
106106

107+
QDir().remove(socketname);
107108
// Start nvim
108109
QProcess p;
109110
p.setProgram("nvim");
@@ -120,7 +121,7 @@ private slots:
120121
qDebug() << c->connectionDescription();
121122
QSignalSpy onReady(c, SIGNAL(ready()));
122123
QVERIFY(onReady.isValid());
123-
QVERIFY(SPYWAIT(onReady));
124+
QVERIFY(SPYWAIT(onReady, 5000 /*msec*/));
124125

125126
QCOMPARE(c->connectionType(), NeovimConnector::SocketConnection);
126127
}

0 commit comments

Comments
 (0)