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:
1 parent
63d10ccb17
commit
b642d92ce7
8 files changed
+152
-85
No files matched your search
@@ -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