diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-20 19:07:07 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-20 19:07:07 +0100 |
commit | bdb01c2c068df326f5a8328ed1492ab1bea388c5 (patch) | |
tree | 25c2ee1b29bc481b6914c244ed9ca194b1415d16 /tests/resourcecommunicationtest.cpp | |
parent | 17e7ee40c9185c0505883853345fd6024c675b1a (diff) | |
download | sink-bdb01c2c068df326f5a8328ed1492ab1bea388c5.tar.gz sink-bdb01c2c068df326f5a8328ed1492ab1bea388c5.zip |
Renamed Akonadi2 to Sink
(except for documentation).
Diffstat (limited to 'tests/resourcecommunicationtest.cpp')
-rw-r--r-- | tests/resourcecommunicationtest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/resourcecommunicationtest.cpp b/tests/resourcecommunicationtest.cpp index 1b09c5f..f9ea3de 100644 --- a/tests/resourcecommunicationtest.cpp +++ b/tests/resourcecommunicationtest.cpp | |||
@@ -16,9 +16,9 @@ private Q_SLOTS: | |||
16 | { | 16 | { |
17 | const QByteArray resourceIdentifier("test"); | 17 | const QByteArray resourceIdentifier("test"); |
18 | Listener listener(resourceIdentifier); | 18 | Listener listener(resourceIdentifier); |
19 | Akonadi2::ResourceAccess resourceAccess(resourceIdentifier); | 19 | Sink::ResourceAccess resourceAccess(resourceIdentifier); |
20 | 20 | ||
21 | QSignalSpy spy(&resourceAccess, &Akonadi2::ResourceAccess::ready); | 21 | QSignalSpy spy(&resourceAccess, &Sink::ResourceAccess::ready); |
22 | resourceAccess.open(); | 22 | resourceAccess.open(); |
23 | QTRY_COMPARE(spy.size(), 1); | 23 | QTRY_COMPARE(spy.size(), 1); |
24 | } | 24 | } |
@@ -27,14 +27,14 @@ private Q_SLOTS: | |||
27 | { | 27 | { |
28 | const QByteArray resourceIdentifier("test"); | 28 | const QByteArray resourceIdentifier("test"); |
29 | Listener listener(resourceIdentifier); | 29 | Listener listener(resourceIdentifier); |
30 | Akonadi2::ResourceAccess resourceAccess(resourceIdentifier); | 30 | Sink::ResourceAccess resourceAccess(resourceIdentifier); |
31 | resourceAccess.open(); | 31 | resourceAccess.open(); |
32 | 32 | ||
33 | flatbuffers::FlatBufferBuilder fbb; | 33 | flatbuffers::FlatBufferBuilder fbb; |
34 | auto name = fbb.CreateString("test"); | 34 | auto name = fbb.CreateString("test"); |
35 | auto command = Akonadi2::Commands::CreateHandshake(fbb, name); | 35 | auto command = Sink::Commands::CreateHandshake(fbb, name); |
36 | Akonadi2::Commands::FinishHandshakeBuffer(fbb, command); | 36 | Sink::Commands::FinishHandshakeBuffer(fbb, command); |
37 | auto result = resourceAccess.sendCommand(Akonadi2::Commands::HandshakeCommand, fbb).exec(); | 37 | auto result = resourceAccess.sendCommand(Sink::Commands::HandshakeCommand, fbb).exec(); |
38 | result.waitForFinished(); | 38 | result.waitForFinished(); |
39 | QVERIFY(!result.errorCode()); | 39 | QVERIFY(!result.errorCode()); |
40 | } | 40 | } |
@@ -43,14 +43,14 @@ private Q_SLOTS: | |||
43 | { | 43 | { |
44 | const QByteArray resourceIdentifier("test"); | 44 | const QByteArray resourceIdentifier("test"); |
45 | Listener listener(resourceIdentifier); | 45 | Listener listener(resourceIdentifier); |
46 | Akonadi2::ResourceAccess resourceAccess(resourceIdentifier); | 46 | Sink::ResourceAccess resourceAccess(resourceIdentifier); |
47 | resourceAccess.open(); | 47 | resourceAccess.open(); |
48 | 48 | ||
49 | const int count = 500; | 49 | const int count = 500; |
50 | int complete = 0; | 50 | int complete = 0; |
51 | int errors = 0; | 51 | int errors = 0; |
52 | for (int i = 0; i < count; i++) { | 52 | for (int i = 0; i < count; i++) { |
53 | auto result = resourceAccess.sendCommand(Akonadi2::Commands::PingCommand) | 53 | auto result = resourceAccess.sendCommand(Sink::Commands::PingCommand) |
54 | .then<void>([&complete]() { | 54 | .then<void>([&complete]() { |
55 | complete++; | 55 | complete++; |
56 | }, | 56 | }, |
@@ -69,14 +69,14 @@ private Q_SLOTS: | |||
69 | qDebug(); | 69 | qDebug(); |
70 | const QByteArray resourceIdentifier("test"); | 70 | const QByteArray resourceIdentifier("test"); |
71 | Listener listener(resourceIdentifier); | 71 | Listener listener(resourceIdentifier); |
72 | Akonadi2::ResourceAccess resourceAccess(resourceIdentifier); | 72 | Sink::ResourceAccess resourceAccess(resourceIdentifier); |
73 | resourceAccess.open(); | 73 | resourceAccess.open(); |
74 | 74 | ||
75 | const int count = 10; | 75 | const int count = 10; |
76 | int complete = 0; | 76 | int complete = 0; |
77 | int errors = 0; | 77 | int errors = 0; |
78 | for (int i = 0; i < count; i++) { | 78 | for (int i = 0; i < count; i++) { |
79 | resourceAccess.sendCommand(Akonadi2::Commands::PingCommand) | 79 | resourceAccess.sendCommand(Sink::Commands::PingCommand) |
80 | .then<void>([&complete]() { | 80 | .then<void>([&complete]() { |
81 | complete++; | 81 | complete++; |
82 | }, | 82 | }, |