forked from ondra/colnod-connector
increase timeout on QSignalSpy
This commit is contained in:
parent
c16ca8c0d7
commit
c469149622
@ -6,7 +6,7 @@ void UnitTest::loginSuccessfully()
|
||||
QJsonDocument config = testAccess->getConfig();
|
||||
QSignalSpy spy(testAccess, SIGNAL(successLogin()));
|
||||
testAccess->login(host, email, password);
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QVERIFY(spy.isValid());
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QString json = testAccess->getResponse();
|
||||
@ -22,7 +22,7 @@ void UnitTest::getSubjects()
|
||||
RequestManager* testAccess = new RequestManager();
|
||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
||||
response = testAccess->getSubjects();
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QVERIFY(spy.isValid());
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QString json = response->reply->readAll();
|
||||
@ -41,7 +41,7 @@ void UnitTest::getTokens()
|
||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
||||
response = testAccess->getTokens();
|
||||
QCOMPARE(spy.count(), 0);
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QVERIFY(spy.isValid());
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QString json = response->reply->readAll();
|
||||
@ -59,7 +59,7 @@ void UnitTest::getTokenSubject()
|
||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
||||
response = testAccess->getTokenSubject();
|
||||
QCOMPARE(spy.count(), 0);
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QVERIFY(spy.isValid());
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QString json = response->reply->readAll();
|
||||
@ -85,7 +85,7 @@ void UnitTest::subjectJSONParser()
|
||||
RequestManager* testAccess = new RequestManager();
|
||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
||||
response = testAccess->getSubjects();
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QString json = response->reply->readAll();
|
||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||
QJsonArray arr = doc.object()["items"].toArray();
|
||||
@ -101,7 +101,7 @@ void UnitTest::tokenJSONParser()
|
||||
RequestManager* testAccess = new RequestManager();
|
||||
QSignalSpy spy(testAccess, SIGNAL(responseReady()));
|
||||
response = testAccess->getTokens();
|
||||
spy.wait();
|
||||
spy.wait(10000);
|
||||
QString json = response->reply->readAll();
|
||||
QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8());
|
||||
QJsonArray arr = doc.object()["items"].toArray();
|
||||
@ -169,5 +169,11 @@ void UnitTest::saveDataToDB()
|
||||
|
||||
}
|
||||
|
||||
void UnitTest::getUuid()
|
||||
{
|
||||
qDebug() << QUuid::createUuid().toString(QUuid::WithoutBraces);
|
||||
QCOMPARE(1,1);
|
||||
}
|
||||
|
||||
|
||||
QTEST_MAIN(UnitTest)
|
||||
|
||||
@ -20,12 +20,13 @@ private slots:
|
||||
void loginSuccessfully(); // /AaaManager/authSession
|
||||
void getSubjects(); // /SubjectManager/getSubjects
|
||||
void getTokens(); // /TokenManager/getTokens
|
||||
void getTokenSubject(); // /OpenManager/getTokenSubject
|
||||
void getTokenSubject(); // /OpenManager/getTokenSubject
|
||||
void subjectJSONParser();
|
||||
void tokenJSONParser();
|
||||
void connectToDB();
|
||||
//void debugConnection();
|
||||
void saveDataToDB();
|
||||
void getUuid();
|
||||
|
||||
private:
|
||||
//QString host = "http://localhost:8080"; //colnod server (ssh -L 8080:192.168.254.11:8443 penta-master)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user