REST: Node and item manipulation using REST API - JSON - #4728

Test duration: 8.878s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.090s
2020-06-25 00:17:22 |

2020-06-25 00:17:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:22 | ------------------------------------

2020-06-25 00:17:22 | [Mutex] waiting for: [configured:node:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:node-9fe2b168-9929-4474-833c-fc848aec02de]

2020-06-25 00:17:23 | [Mutex] received everything.

2020-06-25 00:17:23 | [Mutex] isItemNotified: configured:node:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:node-9fe2b168-9929-4474-833c-fc848aec02de :: true

2020-06-25 00:17:24 | [Mutex] waiting for: [received:nodes:10576ed0-fbbe-491d-bd47-888c1779e101:localhost]

2020-06-25 00:17:24 | [Mutex] received everything.

2020-06-25 00:17:24 | [Mutex] isItemNotified: received:node:10576ed0-fbbe-491d-bd47-888c1779e101:localhost:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:Node f65f36ec-cd40-467d-84b6-3206e4a2bf83 :: true

2020-06-25 00:17:24 | [Mutex] waiting for: [received:nodes:f2660473-a2b8-4f46-8960-cda9a17e1f7a:localhost]

2020-06-25 00:17:24 | [Mutex] received everything.

2020-06-25 00:17:24 | [Mutex] isItemNotified: received:node:f2660473-a2b8-4f46-8960-cda9a17e1f7a:localhost:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:Node f65f36ec-cd40-467d-84b6-3206e4a2bf83 :: false

createNodes 1.560s
2020-06-25 00:17:20 |

2020-06-25 00:17:20 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:20 | ------------------------------------

2020-06-25 00:17:20 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "pubsub#title": "Node f65f36ec-cd40-467d-84b6-3206e4a2bf83"
}

2020-06-25 00:17:20 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-25 00:17:21 | [Mutex] waiting for: [received:nodes:4c8d7fa0-c765-4404-a72c-84a14d33fbe9:localhost]

2020-06-25 00:17:21 | [Mutex] received everything.

2020-06-25 00:17:21 | [Mutex] isItemNotified: received:node:4c8d7fa0-c765-4404-a72c-84a14d33fbe9:localhost:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:Node f65f36ec-cd40-467d-84b6-3206e4a2bf83 :: true

createSubnodes 1.021s
2020-06-25 00:17:21 |

2020-06-25 00:17:21 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:21 | ------------------------------------

2020-06-25 00:17:21 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-9fe2b168-9929-4474-833c-fc848aec02de",
    "pubsub#title": "Node 9fe2b168-9929-4474-833c-fc848aec02de"
}

2020-06-25 00:17:21 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-25 00:17:22 | [Mutex] waiting for: [received:nodes:9c08b9c8-7e47-4ae5-9757-b605f45d524f:localhost]

2020-06-25 00:17:22 | [Mutex] waiting for: [received:nodes:9c08b9c8-7e47-4ae5-9757-b605f45d524f:localhost]

2020-06-25 00:17:22 | [Mutex] received everything.

2020-06-25 00:17:22 | [Mutex] isItemNotified: received:node:9c08b9c8-7e47-4ae5-9757-b605f45d524f:localhost:node-9fe2b168-9929-4474-833c-fc848aec02de:Node 9fe2b168-9929-4474-833c-fc848aec02de :: true

deleteNodes 1.015s
2020-06-25 00:17:27 |

2020-06-25 00:17:27 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:27 | ------------------------------------

2020-06-25 00:17:27 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-9fe2b168-9929-4474-833c-fc848aec02de"
}

2020-06-25 00:17:27 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-25 00:17:28 | [Mutex] waiting for: [received:nodes:4de7a870-ecc6-4ea3-a5ec-4daff6cd4d57:localhost]

2020-06-25 00:17:28 | [Mutex] received everything.

2020-06-25 00:17:28 | [Mutex] isItemNotified: received:node:4de7a870-ecc6-4ea3-a5ec-4daff6cd4d57:localhost:node-9fe2b168-9929-4474-833c-fc848aec02de:Node 9fe2b168-9929-4474-833c-fc848aec02de :: false

deleteSubnodes 1.049s
2020-06-25 00:17:26 |

2020-06-25 00:17:26 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:26 | ------------------------------------

2020-06-25 00:17:26 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83"
}

2020-06-25 00:17:26 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-25 00:17:27 | [Mutex] waiting for: [received:nodes:e8dd4368-e5db-42c6-a9b2-8fd0d8e0b829:localhost]

2020-06-25 00:17:27 | [Mutex] received everything.

2020-06-25 00:17:27 | [Mutex] isItemNotified: received:node:e8dd4368-e5db-42c6-a9b2-8fd0d8e0b829:localhost:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:Node f65f36ec-cd40-467d-84b6-3206e4a2bf83 :: false

2020-06-25 00:17:27 | [Mutex] waiting for: [received:nodes:cb043d1a-d601-4316-b1e5-916a8397127b:localhost]

2020-06-25 00:17:27 | [Mutex] received everything.

2020-06-25 00:17:27 | [Mutex] isItemNotified: received:node:cb043d1a-d601-4316-b1e5-916a8397127b:localhost:node-f65f36ec-cd40-467d-84b6-3206e4a2bf83:Node f65f36ec-cd40-467d-84b6-3206e4a2bf83 :: false

publishItemsToNodes 0.036s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "entry": "<test>item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3</test>",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3"
}

2020-06-25 00:17:25 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3"
}

2020-06-25 00:17:25 | [Mutex] waiting for: [published:item:notifieditem-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3:admin@localhost]

2020-06-25 00:17:25 | [Mutex] received everything.

2020-06-25 00:17:25 | [Mutex] isItemNotified: published:item:notifieditem-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3:admin@localhost :: true

retractItemsFromNodes 0.052s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3"
}

2020-06-25 00:17:25 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3"
}

2020-06-25 00:17:25 | [Mutex] received everything.

2020-06-25 00:17:25 | [Mutex] isItemNotified: retracted:item:notifieditem-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3:admin@localhost :: true

retrieveItemsFromNodes 0.055s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3"
}

2020-06-25 00:17:25 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "item-id": "item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3",
    "item": [
        "<item id=\"item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3\"><test>item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3</test></item>"
    ]
}

2020-06-25 00:17:25 | [Mutex] notify: [retrieved:item:item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3:payload-matches:true:localhost]

2020-06-25 00:17:25 | [Mutex] received everything.

2020-06-25 00:17:25 | [Mutex] isItemNotified: retrieved:item:item-f0ebf3d7-b809-4abe-8d11-87f4be6fb6d3:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.048s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-06-25 00:17:25 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "test",
        "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
        "node-9fe2b168-9929-4474-833c-fc848aec02de"
    ]
}

retrieveUserSubscriptionsWithRegex 0.050s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-f65f36ec-cd40-467d-84b6-3206e4a2bf83)"
}

2020-06-25 00:17:25 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.013s
2020-06-25 00:17:24 |

2020-06-25 00:17:24 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:24 | ------------------------------------

2020-06-25 00:17:24 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-25 00:17:24 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.068s
2020-06-25 00:17:25 |

2020-06-25 00:17:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-25 00:17:25 | ------------------------------------

2020-06-25 00:17:25 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-f65f36ec-cd40-467d-84b6-3206e4a2bf83",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-25 00:17:25 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}