Skip to content

Commit

Permalink
Make connector test non-flaky
Browse files Browse the repository at this point in the history
Rerunning the connector test will fail if the socket file already
exists.
  • Loading branch information
equalsraf authored and equalsraf committed Jul 2, 2022
1 parent 075f5ea commit 8a3ac03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/tst_neovimconnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ private slots:
void connectToSocket() {
QFETCH(QString, socketname);

QDir().remove(socketname);
// Start nvim
QProcess p;
p.setProgram("nvim");
Expand All @@ -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);
}
Expand Down

0 comments on commit 8a3ac03

Please sign in to comment.