mirror of
https://github.com/znc/znc.git
synced 2026-05-02 19:42:32 +02:00
Switch integration test to mostly use unix sockets
By not using the same hardcoded number for every test, we can parallelize the test now. There are several cases remaining where we can't easily use unix sockets (e.g. QSslSocket or imapauth module), for that ask kernel what port number is currently free to use. This is a bit racy though.
This commit is contained in:
@@ -14,9 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include "base.h"
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include <QTcpServer>
|
||||
|
||||
using testing::AnyOf;
|
||||
using testing::Eq;
|
||||
|
||||
@@ -58,4 +61,10 @@ Process::~Process() {
|
||||
}
|
||||
}
|
||||
|
||||
int PickPortNumber() {
|
||||
QTcpServer tcp;
|
||||
tcp.listen(QHostAddress::LocalHost);
|
||||
return tcp.serverPort();
|
||||
}
|
||||
|
||||
} // namespace znc_inttest
|
||||
|
||||
Reference in New Issue
Block a user