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

Test duration: 9.092s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.118s
2020-06-24 23:22:20 |

2020-06-24 23:22:20 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:20 | ------------------------------------

2020-06-24 23:22:20 | [Mutex] waiting for: [configured:node:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70]

2020-06-24 23:22:20 | [Mutex] received everything.

2020-06-24 23:22:20 | [Mutex] isItemNotified: configured:node:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70 :: true

2020-06-24 23:22:21 | [Mutex] waiting for: [received:nodes:16998d84-f165-4001-aa16-a01a69ced9c8:localhost]

2020-06-24 23:22:21 | [Mutex] received everything.

2020-06-24 23:22:21 | [Mutex] isItemNotified: received:node:16998d84-f165-4001-aa16-a01a69ced9c8:localhost:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4 :: true

2020-06-24 23:22:21 | [Mutex] waiting for: [received:nodes:2f0c2833-024f-42ed-be5f-ee1f19db10de:localhost]

2020-06-24 23:22:21 | [Mutex] received everything.

2020-06-24 23:22:21 | [Mutex] isItemNotified: received:node:2f0c2833-024f-42ed-be5f-ee1f19db10de:localhost:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4 :: false

createNodes 1.743s
2020-06-24 23:22:17 |

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

2020-06-24 23:22:17 | ------------------------------------

2020-06-24 23:22:18 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "pubsub#title": "Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4"
}

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

2020-06-24 23:22:19 | [Mutex] waiting for: [received:nodes:b7ebaabb-c613-4ff4-aeb9-5f0825c118ae:localhost]

2020-06-24 23:22:19 | [Mutex] received everything.

2020-06-24 23:22:19 | [Mutex] isItemNotified: received:node:b7ebaabb-c613-4ff4-aeb9-5f0825c118ae:localhost:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4 :: true

createSubnodes 1.026s
2020-06-24 23:22:19 |

2020-06-24 23:22:19 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:19 | ------------------------------------

2020-06-24 23:22:19 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70",
    "pubsub#title": "Node 0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70"
}

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

2020-06-24 23:22:20 | [Mutex] waiting for: [received:nodes:9f7e2c0b-11d4-442a-b310-7e1bfbbbfbca:localhost]

2020-06-24 23:22:20 | [Mutex] received everything.

2020-06-24 23:22:20 | [Mutex] isItemNotified: received:node:9f7e2c0b-11d4-442a-b310-7e1bfbbbfbca:localhost:node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70:Node 0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70 :: true

deleteNodes 1.018s
2020-06-24 23:22:24 |

2020-06-24 23:22:24 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:24 | ------------------------------------

2020-06-24 23:22:24 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70"
}

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

2020-06-24 23:22:25 | [Mutex] waiting for: [received:nodes:18f861a4-d830-4107-a4d5-8d18ac4931f1:localhost]

2020-06-24 23:22:25 | [Mutex] received everything.

2020-06-24 23:22:25 | [Mutex] isItemNotified: received:node:18f861a4-d830-4107-a4d5-8d18ac4931f1:localhost:node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70:Node 0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70 :: false

deleteSubnodes 1.028s
2020-06-24 23:22:23 |

2020-06-24 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:23 | ------------------------------------

2020-06-24 23:22:23 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4"
}

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

2020-06-24 23:22:24 | [Mutex] waiting for: [received:nodes:251cfdd8-bfe5-4ac2-ad58-ab88bb9ebcb2:localhost]

2020-06-24 23:22:24 | [Mutex] received everything.

2020-06-24 23:22:24 | [Mutex] isItemNotified: received:node:251cfdd8-bfe5-4ac2-ad58-ab88bb9ebcb2:localhost:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4 :: false

2020-06-24 23:22:24 | [Mutex] waiting for: [received:nodes:03888997-f42c-46ac-b019-9b10aef58639:localhost]

2020-06-24 23:22:24 | [Mutex] received everything.

2020-06-24 23:22:24 | [Mutex] isItemNotified: received:node:03888997-f42c-46ac-b019-9b10aef58639:localhost:node-5a2698e8-2db1-4b3b-96de-4c98c12acce4:Node 5a2698e8-2db1-4b3b-96de-4c98c12acce4 :: false

publishItemsToNodes 0.045s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

2020-06-24 23:22:22 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "entry": "<test>item-fd30fc67-4db6-4f06-b2a9-8c9f03650437</test>",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437"
}

2020-06-24 23:22:22 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437"
}

2020-06-24 23:22:22 | [Mutex] waiting for: [published:item:notifieditem-fd30fc67-4db6-4f06-b2a9-8c9f03650437:admin@localhost]

2020-06-24 23:22:22 | [Mutex] received everything.

2020-06-24 23:22:22 | [Mutex] isItemNotified: published:item:notifieditem-fd30fc67-4db6-4f06-b2a9-8c9f03650437:admin@localhost :: true

retractItemsFromNodes 0.054s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

2020-06-24 23:22:22 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437"
}

2020-06-24 23:22:22 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437"
}

2020-06-24 23:22:22 | [Mutex] received everything.

2020-06-24 23:22:22 | [Mutex] isItemNotified: retracted:item:notifieditem-fd30fc67-4db6-4f06-b2a9-8c9f03650437:admin@localhost :: true

retrieveItemsFromNodes 0.053s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

2020-06-24 23:22:22 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437"
}

2020-06-24 23:22:22 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "item-id": "item-fd30fc67-4db6-4f06-b2a9-8c9f03650437",
    "item": [
        "<item id=\"item-fd30fc67-4db6-4f06-b2a9-8c9f03650437\"><test>item-fd30fc67-4db6-4f06-b2a9-8c9f03650437</test></item>"
    ]
}

2020-06-24 23:22:22 | [Mutex] notify: [retrieved:item:item-fd30fc67-4db6-4f06-b2a9-8c9f03650437:payload-matches:true:localhost]

2020-06-24 23:22:22 | [Mutex] received everything.

2020-06-24 23:22:22 | [Mutex] isItemNotified: retrieved:item:item-fd30fc67-4db6-4f06-b2a9-8c9f03650437:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.048s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

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

2020-06-24 23:22:22 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-0c5fbba2-9a0f-491a-8e09-eb7b3ecc3e70",
        "test",
        "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

2020-06-24 23:22:22 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-5a2698e8-2db1-4b3b-96de-4c98c12acce4)"
}

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

subscribeNodes 1.009s
2020-06-24 23:22:21 |

2020-06-24 23:22:21 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:21 | ------------------------------------

2020-06-24 23:22:21 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.067s
2020-06-24 23:22:22 |

2020-06-24 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-24 23:22:22 | ------------------------------------

2020-06-24 23:22:22 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-5a2698e8-2db1-4b3b-96de-4c98c12acce4",
    "jids": [
        "admin@localhost"
    ]
}

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