Windows 11 24H2: mark tst_QDnsLookup::lookupNxDomain as expected to fail

Task-number: QTBUG-136627
Task-number: QTBUG-135599
Change-Id: Ib336f6e8018d210a80d50fdd4c1c50f691232104
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Elias Toivola 2025-05-14 14:29:44 +03:00 committed by Mårten Nordheim
parent bdb46a306c
commit 0cd5788ab3

View File

@ -5,6 +5,7 @@
#include <QTest>
#include <QSignalSpy>
#include <QtTest/private/qpropertytesthelper_p.h>
#include <QOperatingSystemVersion>
#include <QtNetwork/QDnsLookup>
@ -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);
}