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

Test duration: 8.984s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.086s
2019-11-24 20:44:42 |

2019-11-24 20:44:42 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:42 | ------------------------------------

2019-11-24 20:44:42 | [Mutex] waiting for: [configured:node:node-ba134f14-8429-440d-a2e4-f56d216439cc:node-08bf335f-b591-4872-b6b7-160a99086191]

2019-11-24 20:44:42 | [Mutex] received everything.

2019-11-24 20:44:42 | [Mutex] isItemNotified: configured:node:node-ba134f14-8429-440d-a2e4-f56d216439cc:node-08bf335f-b591-4872-b6b7-160a99086191 :: true

2019-11-24 20:44:43 | [Mutex] waiting for: [received:nodes:d118659a-fb09-4a6a-bf77-fa591b7dee13:localhost]

2019-11-24 20:44:43 | [Mutex] received everything.

2019-11-24 20:44:43 | [Mutex] isItemNotified: received:node:d118659a-fb09-4a6a-bf77-fa591b7dee13:localhost:node-ba134f14-8429-440d-a2e4-f56d216439cc:Node ba134f14-8429-440d-a2e4-f56d216439cc :: true

2019-11-24 20:44:43 | [Mutex] waiting for: [received:nodes:d80844c9-5794-41c4-bcf0-724e229cc642:localhost]

2019-11-24 20:44:43 | [Mutex] received everything.

2019-11-24 20:44:43 | [Mutex] isItemNotified: received:node:d80844c9-5794-41c4-bcf0-724e229cc642:localhost:node-ba134f14-8429-440d-a2e4-f56d216439cc:Node ba134f14-8429-440d-a2e4-f56d216439cc :: false

createNodes 1.766s
2019-11-24 20:44:39 |

2019-11-24 20:44:39 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:39 | ------------------------------------

2019-11-24 20:44:40 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "pubsub#title": "Node ba134f14-8429-440d-a2e4-f56d216439cc"
}

2019-11-24 20:44:40 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-24 20:44:41 | [Mutex] waiting for: [received:nodes:17fde432-55f9-4239-8940-8ad0c0077d40:localhost]

2019-11-24 20:44:41 | [Mutex] waiting for: [received:nodes:17fde432-55f9-4239-8940-8ad0c0077d40:localhost]

2019-11-24 20:44:41 | [Mutex] received everything.

2019-11-24 20:44:41 | [Mutex] isItemNotified: received:node:17fde432-55f9-4239-8940-8ad0c0077d40:localhost:node-ba134f14-8429-440d-a2e4-f56d216439cc:Node ba134f14-8429-440d-a2e4-f56d216439cc :: true

createSubnodes 1.027s
2019-11-24 20:44:41 |

2019-11-24 20:44:41 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:41 | ------------------------------------

2019-11-24 20:44:41 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-08bf335f-b591-4872-b6b7-160a99086191",
    "pubsub#title": "Node 08bf335f-b591-4872-b6b7-160a99086191"
}

2019-11-24 20:44:41 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-24 20:44:42 | [Mutex] waiting for: [received:nodes:6a08ca61-4b20-4789-b094-97a8d03aec4b:localhost]

2019-11-24 20:44:42 | [Mutex] received everything.

2019-11-24 20:44:42 | [Mutex] isItemNotified: received:node:6a08ca61-4b20-4789-b094-97a8d03aec4b:localhost:node-08bf335f-b591-4872-b6b7-160a99086191:Node 08bf335f-b591-4872-b6b7-160a99086191 :: true

deleteNodes 1.017s
2019-11-24 20:44:46 |

2019-11-24 20:44:46 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:46 | ------------------------------------

2019-11-24 20:44:46 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-08bf335f-b591-4872-b6b7-160a99086191"
}

2019-11-24 20:44:46 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-24 20:44:47 | [Mutex] waiting for: [received:nodes:3d0dec87-1554-40bb-90ce-465922d692cf:localhost]

2019-11-24 20:44:47 | [Mutex] received everything.

2019-11-24 20:44:47 | [Mutex] isItemNotified: received:node:3d0dec87-1554-40bb-90ce-465922d692cf:localhost:node-08bf335f-b591-4872-b6b7-160a99086191:Node 08bf335f-b591-4872-b6b7-160a99086191 :: false

deleteSubnodes 1.037s
2019-11-24 20:44:45 |

2019-11-24 20:44:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:45 | ------------------------------------

2019-11-24 20:44:45 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc"
}

2019-11-24 20:44:45 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-24 20:44:46 | [Mutex] waiting for: [received:nodes:3749796c-b12d-4e76-ac3c-072bccc82241:localhost]

2019-11-24 20:44:46 | [Mutex] received everything.

2019-11-24 20:44:46 | [Mutex] isItemNotified: received:node:3749796c-b12d-4e76-ac3c-072bccc82241:localhost:node-ba134f14-8429-440d-a2e4-f56d216439cc:Node ba134f14-8429-440d-a2e4-f56d216439cc :: false

2019-11-24 20:44:46 | [Mutex] waiting for: [received:nodes:d795b4ef-ddfc-4867-8eab-20d88af8a307:localhost]

2019-11-24 20:44:46 | [Mutex] received everything.

2019-11-24 20:44:46 | [Mutex] isItemNotified: received:node:d795b4ef-ddfc-4867-8eab-20d88af8a307:localhost:node-ba134f14-8429-440d-a2e4-f56d216439cc:Node ba134f14-8429-440d-a2e4-f56d216439cc :: false

publishItemsToNodes 0.086s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "entry": "<test>item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb</test>",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb"
}

2019-11-24 20:44:44 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb"
}

2019-11-24 20:44:44 | [Mutex] waiting for: [published:item:notifieditem-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb:admin@localhost]

2019-11-24 20:44:44 | [Mutex] received everything.

2019-11-24 20:44:44 | [Mutex] isItemNotified: published:item:notifieditem-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb:admin@localhost :: true

retractItemsFromNodes 0.055s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb"
}

2019-11-24 20:44:44 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb"
}

2019-11-24 20:44:44 | [Mutex] received everything.

2019-11-24 20:44:44 | [Mutex] isItemNotified: retracted:item:notifieditem-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb:admin@localhost :: true

retrieveItemsFromNodes 0.061s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb"
}

2019-11-24 20:44:44 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "item-id": "item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb",
    "item": [
        "<item id=\"item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb\"><test>item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb</test></item>"
    ]
}

2019-11-24 20:44:44 | [Mutex] notify: [retrieved:item:item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb:payload-matches:true:localhost]

2019-11-24 20:44:44 | [Mutex] received everything.

2019-11-24 20:44:44 | [Mutex] isItemNotified: retrieved:item:item-908b4f61-b8dc-4c7d-92b6-dd05dd57e3cb:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-11-24 20:44:44 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-ba134f14-8429-440d-a2e4-f56d216439cc",
        "node-08bf335f-b591-4872-b6b7-160a99086191"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-ba134f14-8429-440d-a2e4-f56d216439cc)"
}

2019-11-24 20:44:44 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.013s
2019-11-24 20:44:43 |

2019-11-24 20:44:43 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:43 | ------------------------------------

2019-11-24 20:44:43 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-24 20:44:43 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.067s
2019-11-24 20:44:44 |

2019-11-24 20:44:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 20:44:44 | ------------------------------------

2019-11-24 20:44:44 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-ba134f14-8429-440d-a2e4-f56d216439cc",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-24 20:44:44 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}