tst_QDnsLookup: add debugging information with the query time
Change-Id: I455fe22ef4ad4b2f9b01fffd17c805aa76d2b314 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
4503dabfbd
commit
a6d26ef64b
|
|
@ -698,10 +698,13 @@ void tst_QDnsLookup::setNameserver_data()
|
|||
void tst_QDnsLookup::setNameserver_helper(QDnsLookup::Protocol protocol)
|
||||
{
|
||||
QFETCH(QHostAddress, server);
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
std::unique_ptr<QDnsLookup> lookup =
|
||||
lookupCommon(QDnsLookup::Type::A, "a-single", server, 0, protocol);
|
||||
if (!lookup)
|
||||
return;
|
||||
qDebug() << "Lookup took" << timer.elapsed() << "ms";
|
||||
QCOMPARE(lookup->error(), QDnsLookup::NoError);
|
||||
QString result = formatReply(lookup.get()).join(';');
|
||||
QCOMPARE(result, "A 192.0.2.1");
|
||||
|
|
|
|||
Loading…
Reference in New Issue