diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp index 01db1137fcb..9a77a78d66d 100644 --- a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp +++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -538,6 +539,17 @@ void tst_QDnsLookup::lookupNxDomain() return; QCOMPARE(lookup->name(), domainName(domain)); QCOMPARE(lookup->type(), type); + + static bool firstRun = true; + if (!firstRun + && QOperatingSystemVersion::current() + >= QOperatingSystemVersion(QOperatingSystemVersion::Windows11_24H2)) { + // It fails only after the first run, something is incorrectly cached by + // Windows! + QEXPECT_FAIL("", "This test fails on Windows 11 24H2. QTBUG-135599", Abort); + } + firstRun = false; + QCOMPARE(lookup->error(), QDnsLookup::NotFoundError); }