Skip to content

[Tests] Fix test_gui_fileuploader failing - #66543

Merged
troopa81 merged 5 commits into
qgis:masterfrom
troopa81:fix_badssl_errors
Jun 24, 2026
Merged

[Tests] Fix test_gui_fileuploader failing #66543
troopa81 merged 5 commits into
qgis:masterfrom
troopa81:fix_badssl_errors

Conversation

@troopa81

Copy link
Copy Markdown
Contributor

Description

test_gui_fileuploader is failing very often recently and disturb CI. See here for instance

FAIL! : TestQgsFileUploader::testSslError(self-signed) Compared values are not the same
Actual (mErrorMessage): "Upload failed: Connection closed"
Expected (result) : "Upload failed: SSL handshake failed: The certificate is self-signed, and untrusted"

I assume this is related to the online service not responding correctly and closing the connection.

I propose to use a local badssl server instead of a remote one.

AI tool usage

  • Claude helped me to setup the nginx/openssl configuration
Instead of distant one which fails once in a while and disturb CI
@github-actions github-actions Bot added this to the 4.2.0 milestone Jun 23, 2026
@github-actions github-actions Bot added the Chore GitHub and other CI infrastructure changes label Jun 23, 2026
@nyalldawson

Copy link
Copy Markdown
Collaborator

Thanks @troopa81 , this is a much needed cleanup!

There's a few other tests which also call out to badssl (eg network access manager ones) could those also be flipped over?

Comment thread tests/src/gui/testqgsfiledownloader.cpp Outdated
@troopa81

Copy link
Copy Markdown
Contributor Author

There's a few other tests which also call out to badssl (eg network access manager ones) could those also be flipped over?

Done for all tests that were using badssl.com . Those tests were disabled in CI, so I re-enabled them except testSslErrorHandler in testqgsnetworkmanager.cpp which blocks 90% of the time.

Comment thread tests/src/gui/testqgsfileuploader.cpp Outdated
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
To execute locally, unzip the downloaded zip file and run bin\qgis-bin.exe in the extracted directory.
You might be prompted by Windows Defender click "Run anyway"
(Built from commit 6b4752c)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit 6b4752c)

@troopa81
troopa81 merged commit 659fe69 into qgis:master Jun 24, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore GitHub and other CI infrastructure changes

2 participants