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

Test duration: 8.849s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.101s
2019-11-21 04:05:51 |

2019-11-21 04:05:51 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:51 | ------------------------------------

2019-11-21 04:05:51 | [Mutex] waiting for: [configured:node:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:node-46c57063-ea87-4756-bc3d-38cfed2b8ee4]

2019-11-21 04:05:51 | [Mutex] received everything.

2019-11-21 04:05:51 | [Mutex] isItemNotified: configured:node:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:node-46c57063-ea87-4756-bc3d-38cfed2b8ee4 :: true

2019-11-21 04:05:52 | [Mutex] waiting for: [received:nodes:083b1c68-b329-45f1-9b20-e34ea1f66996:localhost]

2019-11-21 04:05:52 | [Mutex] received everything.

2019-11-21 04:05:52 | [Mutex] isItemNotified: received:node:083b1c68-b329-45f1-9b20-e34ea1f66996:localhost:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd :: true

2019-11-21 04:05:52 | [Mutex] waiting for: [received:nodes:c5f166fd-1fac-4cd6-9246-6b1024ab97a2:localhost]

2019-11-21 04:05:52 | [Mutex] received everything.

2019-11-21 04:05:52 | [Mutex] isItemNotified: received:node:c5f166fd-1fac-4cd6-9246-6b1024ab97a2:localhost:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd :: false

createNodes 1.663s
2019-11-21 04:05:48 |

2019-11-21 04:05:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:48 | ------------------------------------

2019-11-21 04:05:49 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "pubsub#title": "Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd"
}

2019-11-21 04:05:49 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-21 04:05:50 | [Mutex] waiting for: [received:nodes:683d236d-1abe-4fa5-90d3-fe6125e4f2a8:localhost]

2019-11-21 04:05:50 | [Mutex] received everything.

2019-11-21 04:05:50 | [Mutex] isItemNotified: received:node:683d236d-1abe-4fa5-90d3-fe6125e4f2a8:localhost:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd :: true

createSubnodes 1.023s
2019-11-21 04:05:50 |

2019-11-21 04:05:50 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:50 | ------------------------------------

2019-11-21 04:05:50 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-46c57063-ea87-4756-bc3d-38cfed2b8ee4",
    "pubsub#title": "Node 46c57063-ea87-4756-bc3d-38cfed2b8ee4"
}

2019-11-21 04:05:50 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-21 04:05:51 | [Mutex] waiting for: [received:nodes:a741d509-e451-49a1-8e32-f9673f3fc21e:localhost]

2019-11-21 04:05:51 | [Mutex] received everything.

2019-11-21 04:05:51 | [Mutex] isItemNotified: received:node:a741d509-e451-49a1-8e32-f9673f3fc21e:localhost:node-46c57063-ea87-4756-bc3d-38cfed2b8ee4:Node 46c57063-ea87-4756-bc3d-38cfed2b8ee4 :: true

deleteNodes 1.023s
2019-11-21 04:05:55 |

2019-11-21 04:05:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:55 | ------------------------------------

2019-11-21 04:05:55 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-46c57063-ea87-4756-bc3d-38cfed2b8ee4"
}

2019-11-21 04:05:55 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-21 04:05:56 | [Mutex] waiting for: [received:nodes:488ff770-250a-4b61-86e2-b4d89f56fcb8:localhost]

2019-11-21 04:05:56 | [Mutex] received everything.

2019-11-21 04:05:56 | [Mutex] isItemNotified: received:node:488ff770-250a-4b61-86e2-b4d89f56fcb8:localhost:node-46c57063-ea87-4756-bc3d-38cfed2b8ee4:Node 46c57063-ea87-4756-bc3d-38cfed2b8ee4 :: false

deleteSubnodes 1.027s
2019-11-21 04:05:54 |

2019-11-21 04:05:54 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:54 | ------------------------------------

2019-11-21 04:05:54 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd"
}

2019-11-21 04:05:54 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-21 04:05:55 | [Mutex] waiting for: [received:nodes:4638c37b-7963-409b-a178-763e10430e06:localhost]

2019-11-21 04:05:55 | [Mutex] received everything.

2019-11-21 04:05:55 | [Mutex] isItemNotified: received:node:4638c37b-7963-409b-a178-763e10430e06:localhost:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd :: false

2019-11-21 04:05:55 | [Mutex] waiting for: [received:nodes:2aaa29f6-657e-4059-8e95-0db7c7ed258d:localhost]

2019-11-21 04:05:55 | [Mutex] received everything.

2019-11-21 04:05:55 | [Mutex] isItemNotified: received:node:2aaa29f6-657e-4059-8e95-0db7c7ed258d:localhost:node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd:Node d7a03710-bc9f-4662-a1e3-7deb8a48cbbd :: false

publishItemsToNodes 0.068s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "entry": "<test>item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4</test>",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4"
}

2019-11-21 04:05:53 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4"
}

2019-11-21 04:05:53 | [Mutex] waiting for: [published:item:notifieditem-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:admin@localhost]

2019-11-21 04:05:53 | [Mutex] received everything.

2019-11-21 04:05:53 | [Mutex] isItemNotified: published:item:notifieditem-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:admin@localhost :: true

retractItemsFromNodes 0.050s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4"
}

2019-11-21 04:05:53 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4"
}

2019-11-21 04:05:53 | [Mutex] waiting for: [retracted:item:notifieditem-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:admin@localhost]

2019-11-21 04:05:53 | [Mutex] received everything.

2019-11-21 04:05:53 | [Mutex] isItemNotified: retracted:item:notifieditem-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:admin@localhost :: true

retrieveItemsFromNodes 0.031s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4"
}

2019-11-21 04:05:53 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "item-id": "item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4",
    "item": [
        "<item id=\"item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4\"><test>item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4</test></item>"
    ]
}

2019-11-21 04:05:53 | [Mutex] notify: [retrieved:item:item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:payload-matches:true:localhost]

2019-11-21 04:05:53 | [Mutex] received everything.

2019-11-21 04:05:53 | [Mutex] isItemNotified: retrieved:item:item-12f2e9bf-84ef-4ff2-9573-7d30fee85fa4:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.058s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-11-21 04:05:53 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
        "node-46c57063-ea87-4756-bc3d-38cfed2b8ee4"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd)"
}

2019-11-21 04:05:53 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.014s
2019-11-21 04:05:52 |

2019-11-21 04:05:52 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:52 | ------------------------------------

2019-11-21 04:05:52 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-21 04:05:52 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.071s
2019-11-21 04:05:53 |

2019-11-21 04:05:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 04:05:53 | ------------------------------------

2019-11-21 04:05:53 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-d7a03710-bc9f-4662-a1e3-7deb8a48cbbd",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-21 04:05:53 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}