Changeset View
Changeset View
Standalone View
Standalone View
autotests/fakeserver.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | |||||
76 | * @endcode | 76 | * @endcode | ||
77 | */ | 77 | */ | ||
78 | 78 | | |||
79 | class FakeServer : public QThread | 79 | class FakeServer : public QThread | ||
80 | { | 80 | { | ||
81 | Q_OBJECT | 81 | Q_OBJECT | ||
82 | 82 | | |||
83 | public: | 83 | public: | ||
84 | FakeServer(QObject *parent = nullptr); | 84 | /** | ||
85 | * Each unittest should use a different port so that they can be run in parallel | ||||
86 | */ | ||||
87 | FakeServer(int port = 5989, QObject *parent = nullptr); | ||||
85 | ~FakeServer(); | 88 | ~FakeServer(); | ||
86 | 89 | | |||
87 | /** | 90 | /** | ||
88 | * Starts the server and waits for it to be ready | 91 | * Starts the server and waits for it to be ready | ||
89 | * | 92 | * | ||
90 | * You should use this instead of start() to avoid race conditions. | 93 | * You should use this instead of start() to avoid race conditions. | ||
91 | */ | 94 | */ | ||
92 | void startAndWait(); | 95 | void startAndWait(); | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |