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

Test duration: 9.001s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.098s
2020-06-26 00:22:36 |

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

2020-06-26 00:22:36 | ------------------------------------

2020-06-26 00:22:36 | [Mutex] waiting for: [configured:node:node-d7fc0bca-a61c-4245-a070-fe711755c63a:node-6ce44f19-62d7-4043-a394-77970855a09d]

2020-06-26 00:22:37 | [Mutex] received everything.

2020-06-26 00:22:37 | [Mutex] isItemNotified: configured:node:node-d7fc0bca-a61c-4245-a070-fe711755c63a:node-6ce44f19-62d7-4043-a394-77970855a09d :: true

2020-06-26 00:22:38 | [Mutex] waiting for: [received:nodes:efc12d92-7ed3-418b-a000-6f1d98d298e2:localhost]

2020-06-26 00:22:38 | [Mutex] received everything.

2020-06-26 00:22:38 | [Mutex] isItemNotified: received:node:efc12d92-7ed3-418b-a000-6f1d98d298e2:localhost:node-d7fc0bca-a61c-4245-a070-fe711755c63a:Node d7fc0bca-a61c-4245-a070-fe711755c63a :: true

2020-06-26 00:22:38 | [Mutex] waiting for: [received:nodes:a94be47d-0635-437d-ba12-fcd2cc15a49a:localhost]

2020-06-26 00:22:38 | [Mutex] received everything.

2020-06-26 00:22:38 | [Mutex] isItemNotified: received:node:a94be47d-0635-437d-ba12-fcd2cc15a49a:localhost:node-d7fc0bca-a61c-4245-a070-fe711755c63a:Node d7fc0bca-a61c-4245-a070-fe711755c63a :: false

createNodes 1.631s
2020-06-26 00:22:34 |

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

2020-06-26 00:22:34 | ------------------------------------

2020-06-26 00:22:34 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "pubsub#title": "Node d7fc0bca-a61c-4245-a070-fe711755c63a"
}

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

2020-06-26 00:22:35 | [Mutex] waiting for: [received:nodes:a2a88596-46a7-4958-8bca-59c36f977204:localhost]

2020-06-26 00:22:35 | [Mutex] received everything.

2020-06-26 00:22:35 | [Mutex] isItemNotified: received:node:a2a88596-46a7-4958-8bca-59c36f977204:localhost:node-d7fc0bca-a61c-4245-a070-fe711755c63a:Node d7fc0bca-a61c-4245-a070-fe711755c63a :: true

createSubnodes 1.020s
2020-06-26 00:22:35 |

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

2020-06-26 00:22:35 | ------------------------------------

2020-06-26 00:22:35 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-6ce44f19-62d7-4043-a394-77970855a09d",
    "pubsub#title": "Node 6ce44f19-62d7-4043-a394-77970855a09d"
}

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

2020-06-26 00:22:36 | [Mutex] waiting for: [received:nodes:0bed34b9-32cf-4594-acf5-55c1db920c85:localhost]

2020-06-26 00:22:36 | [Mutex] received everything.

2020-06-26 00:22:36 | [Mutex] isItemNotified: received:node:0bed34b9-32cf-4594-acf5-55c1db920c85:localhost:node-6ce44f19-62d7-4043-a394-77970855a09d:Node 6ce44f19-62d7-4043-a394-77970855a09d :: true

deleteNodes 1.022s
2020-06-26 00:22:41 |

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

2020-06-26 00:22:41 | ------------------------------------

2020-06-26 00:22:41 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-6ce44f19-62d7-4043-a394-77970855a09d"
}

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

2020-06-26 00:22:42 | [Mutex] waiting for: [received:nodes:18f61f3f-6bb1-45bc-a39f-4280f7957a6b:localhost]

2020-06-26 00:22:42 | [Mutex] received everything.

2020-06-26 00:22:42 | [Mutex] isItemNotified: received:node:18f61f3f-6bb1-45bc-a39f-4280f7957a6b:localhost:node-6ce44f19-62d7-4043-a394-77970855a09d:Node 6ce44f19-62d7-4043-a394-77970855a09d :: false

deleteSubnodes 1.021s
2020-06-26 00:22:40 |

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

2020-06-26 00:22:40 | ------------------------------------

2020-06-26 00:22:40 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a"
}

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

2020-06-26 00:22:41 | [Mutex] waiting for: [received:nodes:04016454-a4ab-44a6-addd-93999d7c0f6d:localhost]

2020-06-26 00:22:41 | [Mutex] received everything.

2020-06-26 00:22:41 | [Mutex] isItemNotified: received:node:04016454-a4ab-44a6-addd-93999d7c0f6d:localhost:node-d7fc0bca-a61c-4245-a070-fe711755c63a:Node d7fc0bca-a61c-4245-a070-fe711755c63a :: false

2020-06-26 00:22:41 | [Mutex] waiting for: [received:nodes:d251f5e1-404e-4c8c-be6d-b09da640399c:localhost]

2020-06-26 00:22:41 | [Mutex] received everything.

2020-06-26 00:22:41 | [Mutex] isItemNotified: received:node:d251f5e1-404e-4c8c-be6d-b09da640399c:localhost:node-d7fc0bca-a61c-4245-a070-fe711755c63a:Node d7fc0bca-a61c-4245-a070-fe711755c63a :: false

publishItemsToNodes 0.049s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

2020-06-26 00:22:39 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "entry": "<test>item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78</test>",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78"
}

2020-06-26 00:22:39 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78"
}

2020-06-26 00:22:39 | [Mutex] waiting for: [published:item:notifieditem-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:admin@localhost]

2020-06-26 00:22:39 | [Mutex] received everything.

2020-06-26 00:22:39 | [Mutex] isItemNotified: published:item:notifieditem-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:admin@localhost :: true

retractItemsFromNodes 0.073s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

2020-06-26 00:22:39 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78"
}

2020-06-26 00:22:39 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78"
}

2020-06-26 00:22:39 | [Mutex] waiting for: [retracted:item:notifieditem-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:admin@localhost]

2020-06-26 00:22:39 | [Mutex] received everything.

2020-06-26 00:22:39 | [Mutex] isItemNotified: retracted:item:notifieditem-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:admin@localhost :: true

retrieveItemsFromNodes 0.053s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

2020-06-26 00:22:39 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78"
}

2020-06-26 00:22:39 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "item-id": "item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78",
    "item": [
        "<item id=\"item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78\"><test>item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78</test></item>"
    ]
}

2020-06-26 00:22:39 | [Mutex] notify: [retrieved:item:item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:payload-matches:true:localhost]

2020-06-26 00:22:39 | [Mutex] received everything.

2020-06-26 00:22:39 | [Mutex] isItemNotified: retrieved:item:item-be74682b-57b1-4d2b-85d7-1e5c4a0bea78:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

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

2020-06-26 00:22:39 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
        "test",
        "node-6ce44f19-62d7-4043-a394-77970855a09d"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

2020-06-26 00:22:39 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-d7fc0bca-a61c-4245-a070-fe711755c63a)"
}

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

subscribeNodes 1.013s
2020-06-26 00:22:38 |

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

2020-06-26 00:22:38 | ------------------------------------

2020-06-26 00:22:38 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.086s
2020-06-26 00:22:39 |

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

2020-06-26 00:22:39 | ------------------------------------

2020-06-26 00:22:39 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-d7fc0bca-a61c-4245-a070-fe711755c63a",
    "jids": [
        "admin@localhost"
    ]
}

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