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

Test duration: 9.097s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.158s
2019-11-22 20:13:13 |

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

2019-11-22 20:13:13 | ------------------------------------

2019-11-22 20:13:13 | [Mutex] waiting for: [configured:node:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:node-e024cb24-fe72-4447-9615-acf36196a7da]

2019-11-22 20:13:13 | [Mutex] received everything.

2019-11-22 20:13:13 | [Mutex] isItemNotified: configured:node:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:node-e024cb24-fe72-4447-9615-acf36196a7da :: true

2019-11-22 20:13:14 | [Mutex] waiting for: [received:nodes:f3f7a67a-710d-4759-be21-f7dbd24e42b5:localhost]

2019-11-22 20:13:14 | [Mutex] received everything.

2019-11-22 20:13:14 | [Mutex] isItemNotified: received:node:f3f7a67a-710d-4759-be21-f7dbd24e42b5:localhost:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6 :: true

2019-11-22 20:13:14 | [Mutex] waiting for: [received:nodes:d3d8a5e3-5d40-4098-8688-5503c20b04b3:localhost]

2019-11-22 20:13:14 | [Mutex] received everything.

2019-11-22 20:13:14 | [Mutex] isItemNotified: received:node:d3d8a5e3-5d40-4098-8688-5503c20b04b3:localhost:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6 :: false

createNodes 1.811s
2019-11-22 20:13:10 |

2019-11-22 20:13:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:10 | ------------------------------------

2019-11-22 20:13:11 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "pubsub#title": "Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6"
}

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

2019-11-22 20:13:12 | [Mutex] waiting for: [received:nodes:c0401fca-7197-4fa2-833f-7c9f2264d245:localhost]

2019-11-22 20:13:12 | [Mutex] received everything.

2019-11-22 20:13:12 | [Mutex] isItemNotified: received:node:c0401fca-7197-4fa2-833f-7c9f2264d245:localhost:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6 :: true

createSubnodes 1.025s
2019-11-22 20:13:12 |

2019-11-22 20:13:12 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:12 | ------------------------------------

2019-11-22 20:13:12 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-e024cb24-fe72-4447-9615-acf36196a7da",
    "pubsub#title": "Node e024cb24-fe72-4447-9615-acf36196a7da"
}

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

2019-11-22 20:13:13 | [Mutex] waiting for: [received:nodes:fc4b7d0e-d30f-4549-9518-2c5cd7bc81d8:localhost]

2019-11-22 20:13:13 | [Mutex] received everything.

2019-11-22 20:13:13 | [Mutex] isItemNotified: received:node:fc4b7d0e-d30f-4549-9518-2c5cd7bc81d8:localhost:node-e024cb24-fe72-4447-9615-acf36196a7da:Node e024cb24-fe72-4447-9615-acf36196a7da :: true

deleteNodes 1.022s
2019-11-22 20:13:17 |

2019-11-22 20:13:17 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:17 | ------------------------------------

2019-11-22 20:13:17 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-e024cb24-fe72-4447-9615-acf36196a7da"
}

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

2019-11-22 20:13:18 | [Mutex] waiting for: [received:nodes:a91ad345-4579-492c-85c7-33e3b942c002:localhost]

2019-11-22 20:13:18 | [Mutex] received everything.

2019-11-22 20:13:18 | [Mutex] isItemNotified: received:node:a91ad345-4579-492c-85c7-33e3b942c002:localhost:node-e024cb24-fe72-4447-9615-acf36196a7da:Node e024cb24-fe72-4447-9615-acf36196a7da :: false

deleteSubnodes 1.028s
2019-11-22 20:13:16 |

2019-11-22 20:13:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:16 | ------------------------------------

2019-11-22 20:13:16 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6"
}

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

2019-11-22 20:13:17 | [Mutex] waiting for: [received:nodes:a9522236-b7c8-4986-a909-4bc708efb32b:localhost]

2019-11-22 20:13:17 | [Mutex] received everything.

2019-11-22 20:13:17 | [Mutex] isItemNotified: received:node:a9522236-b7c8-4986-a909-4bc708efb32b:localhost:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6 :: false

2019-11-22 20:13:17 | [Mutex] waiting for: [received:nodes:88ca97c8-60e2-47d2-b292-1d7dd51cefbd:localhost]

2019-11-22 20:13:17 | [Mutex] received everything.

2019-11-22 20:13:17 | [Mutex] isItemNotified: received:node:88ca97c8-60e2-47d2-b292-1d7dd51cefbd:localhost:node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6:Node 16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6 :: false

publishItemsToNodes 0.040s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

2019-11-22 20:13:15 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "entry": "<test>item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618</test>",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618"
}

2019-11-22 20:13:15 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618"
}

2019-11-22 20:13:15 | [Mutex] received everything.

2019-11-22 20:13:15 | [Mutex] isItemNotified: published:item:notifieditem-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618:admin@localhost :: true

retractItemsFromNodes 0.067s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

2019-11-22 20:13:15 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618"
}

2019-11-22 20:13:15 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618"
}

2019-11-22 20:13:15 | [Mutex] received everything.

2019-11-22 20:13:15 | [Mutex] isItemNotified: retracted:item:notifieditem-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618:admin@localhost :: true

retrieveItemsFromNodes 0.063s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

2019-11-22 20:13:15 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618"
}

2019-11-22 20:13:15 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "item-id": "item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618",
    "item": [
        "<item id=\"item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618\"><test>item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618</test></item>"
    ]
}

2019-11-22 20:13:15 | [Mutex] notify: [retrieved:item:item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618:payload-matches:true:localhost]

2019-11-22 20:13:15 | [Mutex] received everything.

2019-11-22 20:13:15 | [Mutex] isItemNotified: retrieved:item:item-b883d1fe-0c3c-4fad-b1f9-cf251dd7e618:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

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

2019-11-22 20:13:15 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
        "node-e024cb24-fe72-4447-9615-acf36196a7da"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

2019-11-22 20:13:15 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6)"
}

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

subscribeNodes 1.019s
2019-11-22 20:13:14 |

2019-11-22 20:13:14 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:14 | ------------------------------------

2019-11-22 20:13:14 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.059s
2019-11-22 20:13:15 |

2019-11-22 20:13:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 20:13:15 | ------------------------------------

2019-11-22 20:13:15 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-16fa73cb-f20d-4cf0-9945-3ab9cb9ff8e6",
    "jids": [
        "admin@localhost"
    ]
}

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