-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Description
I created my own test that use TF_TEST_SQL_MAIN() macro:
TF_TEST_SQL_MAIN(MyTestApp, true)
In the test I use QNetworkAccessManager to send POST request to a remote server:
QNetworkAccessManager networkAccessManager;
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader, QByteArrayLiteral("application/x-www-form-urlencoded"));
QNetworkReply *reply = networkManager.post(request, args);
QEventLoop eventLoop;
QObject::connect(reply, SIGNAL(finished()), &eventLoop, SLOT(quit()));
eventLoop.exec();
// process reply ...
delete reply;
Everything works fine, but I get 'QWaitCondition: Destroyed while threads are still waiting' at the app exit.
After investigation it turned out that the problem was '_exit(thread.returnCode)' call in TF_TEST_SQL_MAIN().
The destructor of TWebApplication is not called and some of the threads are still running in background.
Is it safe to remove _exit(thread.returnCode) without breaking treefrog tests ?
Metadata
Metadata
Assignees
Labels
No labels