diff --git a/tests/test-proxy/remoteproxytestsproxy.cpp b/tests/test-proxy/remoteproxytestsproxy.cpp index 8c6a324..4011a54 100644 --- a/tests/test-proxy/remoteproxytestsproxy.cpp +++ b/tests/test-proxy/remoteproxytestsproxy.cpp @@ -508,26 +508,26 @@ void RemoteProxyTestsProxy::authenticate_data() QTest::addColumn("expectedError"); QTest::newRow("success") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "" - << 100 << Authenticator::AuthenticationErrorNoError; + << 500 << Authenticator::AuthenticationErrorNoError; QTest::newRow("success") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "nonce" - << 100 << Authenticator::AuthenticationErrorNoError; + << 500 << Authenticator::AuthenticationErrorNoError; QTest::newRow("success") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "nonce" - << 100 << Authenticator::AuthenticationErrorAuthenticationFailed; + << 300 << Authenticator::AuthenticationErrorAuthenticationFailed; QTest::newRow("failed") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "" - << 100 << Authenticator::AuthenticationErrorAuthenticationFailed; + << 300 << Authenticator::AuthenticationErrorAuthenticationFailed; QTest::newRow("not responding") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "" - << 200 << Authenticator::AuthenticationErrorProxyError; + << 500 << Authenticator::AuthenticationErrorProxyError; QTest::newRow("aborted") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "" - << 100 << Authenticator::AuthenticationErrorAborted; + << 300 << Authenticator::AuthenticationErrorAborted; QTest::newRow("unknown") << QUuid::createUuid().toString() << "Testclient, hello form the test!" << m_testToken << "" - << 100 << Authenticator::AuthenticationErrorUnknown; + << 300 << Authenticator::AuthenticationErrorUnknown; } @@ -543,6 +543,10 @@ void RemoteProxyTestsProxy::authenticate() // Start the server startServer(); + m_configuration->setAuthenticationTimeout(8000); + m_configuration->setJsonRpcTimeout(10000); + m_configuration->setInactiveTimeout(10000); + // Configure result m_mockAuthenticator->setExpectedAuthenticationError(expectedError); m_mockAuthenticator->setTimeoutDuration(timeout); diff --git a/tests/testbase/basetest.cpp b/tests/testbase/basetest.cpp index eea50b8..b3d06ac 100644 --- a/tests/testbase/basetest.cpp +++ b/tests/testbase/basetest.cpp @@ -266,8 +266,7 @@ QVariant BaseTest::invokeTcpSocketProxyApiCall(const QString &method, const QVar QSignalSpy dataSpy(socket, &QSslSocket::readyRead); socket->write(jsonDoc.toJson(QJsonDocument::Compact) + '\n'); - // FIXME: check why it waits the full time here - dataSpy.wait(500); + dataSpy.wait(); if (dataSpy.count() != 1) { qWarning() << "No data received"; return QVariant();