broker/Topic: class added

broker/Topic: String Topics replaced by Topic class
broker/Topic#parseTopic: access set to private
broker/SubscriptionsStoreTest: topic tests moved to own class
broker/TopicTest: containsExactly used
broker/TopicTest: TopicAssert class added
broker/TopicTest$TopicAssert#containsToken: method added
broker/TopicTest$TopicAssert#matches: method added
This commit is contained in:
Andreas Mager
2017-02-19 18:29:37 +01:00
committed by Andi
parent 8688a9d098
commit a2e51b2c31
34 changed files with 589 additions and 448 deletions
@@ -34,10 +34,11 @@ public class PerformanceTest {
ThreadMXBean b = ManagementFactory.getThreadMXBean();
String[] topics = new String[n];
Topic[] topics = new Topic[n];
for (int i = 0; i < n; i++) {
topics[i] = (i % users) + "/" + ((i / users) % devices) + "/" + ((i / (users * devices)) % values) + "/"
+ ((i / (users * devices * values)) % subs);
topics[i] = new Topic(
(i % users) + "/" + ((i / users) % devices) + "/" + ((i / (users * devices)) % values) + "/"
+ ((i / (users * devices * values)) % subs));
Subscription sub = new Subscription("CLI_ID_" + (i % users), topics[i], MqttQoS.AT_MOST_ONCE);
aSessionsStore.addNewSubscription(sub);