diff options
Diffstat (limited to 'tests/benchmarks/client')
-rw-r--r-- | tests/benchmarks/client/client-benchmark.cpp | 9 | ||||
-rw-r--r-- | tests/benchmarks/client/client.pro | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/tests/benchmarks/client/client-benchmark.cpp b/tests/benchmarks/client/client-benchmark.cpp index 4134d90..fc8e0b7 100644 --- a/tests/benchmarks/client/client-benchmark.cpp +++ b/tests/benchmarks/client/client-benchmark.cpp @@ -42,7 +42,6 @@ #include <QtTest/QtTest> #include "client-benchmark.h" #include "private/jsondb-connection_p.h" -#include <json.h> #include "util.h" @@ -93,20 +92,17 @@ void TestJson::initTestCase() #ifndef DONT_START_SERVER removeDbFiles(); QString socketName = QString("testjsondb_%1").arg(getpid()); - mProcess = launchJsonDbDaemon(JSONDB_DAEMON_BASE, socketName, QStringList() << "-base-name" << dbfile); + mProcess = launchJsonDbDaemon(JSONDB_DAEMON_BASE, socketName, QStringList() << "-base-name" << dbfile, __FILE__); #endif connectToServer(); QByteArray friendJson("{\"type\": \"object\", \"properties\": {\"name\": {\"type\": \"string\", \"indexed\": true}}}"); - JsonReader reader; - // Create schemas for the items - reader.parse(friendJson); QVariantMap friendSchema; friendSchema.insert("name", "Friends"); - friendSchema.insert("schema", reader.result()); + friendSchema.insert("schema", QJsonDocument::fromJson(friendJson).object().toVariantMap()); friendSchema.insert("_type", "_schemaType"); int id = mClient->create(friendSchema); waitForResponse1(id); @@ -271,7 +267,6 @@ void TestJson::queryThousandItems_data() { QTest::addColumn<QString>("queryString"); QTest::newRow("Friends") << QString("[?_type=\"Friends\"]"); - QTest::newRow("Friends[=_uuid]") << QString("[?_type=\"Friends\"][=_uuid]"); QTest::newRow("Friends[={_uuid:_uuid}]") << QString("[?_type=\"Friends\"][={_uuid:_uuid}]"); } diff --git a/tests/benchmarks/client/client.pro b/tests/benchmarks/client/client.pro index 0ae1dd8..44c55ad 100644 --- a/tests/benchmarks/client/client.pro +++ b/tests/benchmarks/client/client.pro @@ -5,10 +5,6 @@ QT = core network testlib jsondb jsondbcompat-private DEFINES += JSONDB_DAEMON_BASE=\\\"$$QT.jsondb.bins\\\" -INCLUDEPATH += "../../../src/common" -INCLUDEPATH += "../../../src/3rdparty/qjson/src" -SOURCES += ../../../src/3rdparty/qjson/src/json.cpp - CONFIG += qtestlib CONFIG -= app_bundle |