File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -353,14 +353,28 @@ void TestQgsNetworkAccessManager::fetchBadSsl()
353
353
} );
354
354
QgsNetworkAccessManager::instance ()->get ( QNetworkRequest ( u ) );
355
355
356
- while ( !loaded && !gotSslError )
356
+ while ( !loaded && !gotSslError && !gotRequestAboutToBeCreatedSignal )
357
357
{
358
358
qApp->processEvents ();
359
359
}
360
360
361
361
QVERIFY ( gotRequestAboutToBeCreatedSignal );
362
362
363
- // we don't test for background thread ssl error yet -- that signal isn't thread safe
363
+ gotRequestAboutToBeCreatedSignal = false ;
364
+ loaded = false ;
365
+ gotSslError = false ;
366
+ BackgroundRequest *thread = new BackgroundRequest ( QNetworkRequest ( u ) );
367
+
368
+ thread->start ();
369
+
370
+ while ( !loaded && !gotSslError && !gotRequestAboutToBeCreatedSignal )
371
+ {
372
+ qApp->processEvents ();
373
+ }
374
+ QVERIFY ( gotRequestAboutToBeCreatedSignal );
375
+ thread->exit ();
376
+ thread->wait ();
377
+ thread->deleteLater ();
364
378
}
365
379
366
380
void TestQgsNetworkAccessManager::fetchTimeout ()
You can’t perform that action at this time.
0 commit comments