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

Test duration: 8.889s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.104s
2019-11-26 20:16:37 |

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

2019-11-26 20:16:37 | ------------------------------------

2019-11-26 20:16:37 | [Mutex] waiting for: [configured:node:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a]

2019-11-26 20:16:37 | [Mutex] received everything.

2019-11-26 20:16:37 | [Mutex] isItemNotified: configured:node:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a :: true

2019-11-26 20:16:38 | [Mutex] waiting for: [received:nodes:4e994a48-152a-458b-93e7-690585a6629f:localhost]

2019-11-26 20:16:38 | [Mutex] received everything.

2019-11-26 20:16:38 | [Mutex] isItemNotified: received:node:4e994a48-152a-458b-93e7-690585a6629f:localhost:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:Node 2681d0ff-4ad4-40ea-bf92-ab213190402d :: true

2019-11-26 20:16:38 | [Mutex] waiting for: [received:nodes:a94ffb12-87de-48e0-a6e6-987efaf59044:localhost]

2019-11-26 20:16:38 | [Mutex] received everything.

2019-11-26 20:16:38 | [Mutex] isItemNotified: received:node:a94ffb12-87de-48e0-a6e6-987efaf59044:localhost:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:Node 2681d0ff-4ad4-40ea-bf92-ab213190402d :: false

createNodes 1.682s
2019-11-26 20:16:34 |

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

2019-11-26 20:16:34 | ------------------------------------

2019-11-26 20:16:35 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "pubsub#title": "Node 2681d0ff-4ad4-40ea-bf92-ab213190402d"
}

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

2019-11-26 20:16:36 | [Mutex] waiting for: [received:nodes:5f978381-a719-489d-a0cf-d0a4984defa4:localhost]

2019-11-26 20:16:36 | [Mutex] received everything.

2019-11-26 20:16:36 | [Mutex] isItemNotified: received:node:5f978381-a719-489d-a0cf-d0a4984defa4:localhost:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:Node 2681d0ff-4ad4-40ea-bf92-ab213190402d :: true

createSubnodes 1.030s
2019-11-26 20:16:36 |

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

2019-11-26 20:16:36 | ------------------------------------

2019-11-26 20:16:36 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a",
    "pubsub#title": "Node 5ac00b47-bd22-402b-8aa2-ceaa3e527f0a"
}

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

2019-11-26 20:16:37 | [Mutex] waiting for: [received:nodes:ab842c06-ff4e-48f3-a5c6-e023d2c2f2b8:localhost]

2019-11-26 20:16:37 | [Mutex] received everything.

2019-11-26 20:16:37 | [Mutex] isItemNotified: received:node:ab842c06-ff4e-48f3-a5c6-e023d2c2f2b8:localhost:node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a:Node 5ac00b47-bd22-402b-8aa2-ceaa3e527f0a :: true

deleteNodes 1.022s
2019-11-26 20:16:41 |

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

2019-11-26 20:16:41 | ------------------------------------

2019-11-26 20:16:41 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a"
}

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

2019-11-26 20:16:42 | [Mutex] waiting for: [received:nodes:3a672c04-59a2-46f6-8a10-9bd4baef5f2b:localhost]

2019-11-26 20:16:42 | [Mutex] received everything.

2019-11-26 20:16:42 | [Mutex] isItemNotified: received:node:3a672c04-59a2-46f6-8a10-9bd4baef5f2b:localhost:node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a:Node 5ac00b47-bd22-402b-8aa2-ceaa3e527f0a :: false

deleteSubnodes 1.059s
2019-11-26 20:16:40 |

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

2019-11-26 20:16:40 | ------------------------------------

2019-11-26 20:16:40 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d"
}

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

2019-11-26 20:16:41 | [Mutex] waiting for: [received:nodes:4ebb2251-c3d3-4a10-bb89-2137cdec6139:localhost]

2019-11-26 20:16:41 | [Mutex] received everything.

2019-11-26 20:16:41 | [Mutex] isItemNotified: received:node:4ebb2251-c3d3-4a10-bb89-2137cdec6139:localhost:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:Node 2681d0ff-4ad4-40ea-bf92-ab213190402d :: false

2019-11-26 20:16:41 | [Mutex] waiting for: [received:nodes:f62f20a0-9c83-4735-abbf-6c6235871150:localhost]

2019-11-26 20:16:41 | [Mutex] received everything.

2019-11-26 20:16:41 | [Mutex] isItemNotified: received:node:f62f20a0-9c83-4735-abbf-6c6235871150:localhost:node-2681d0ff-4ad4-40ea-bf92-ab213190402d:Node 2681d0ff-4ad4-40ea-bf92-ab213190402d :: false

publishItemsToNodes 0.041s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

2019-11-26 20:16:39 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "entry": "<test>item-f19d45cc-6ed0-459a-b674-443b400a1b56</test>",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56"
}

2019-11-26 20:16:39 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56"
}

2019-11-26 20:16:39 | [Mutex] waiting for: [published:item:notifieditem-f19d45cc-6ed0-459a-b674-443b400a1b56:admin@localhost]

2019-11-26 20:16:39 | [Mutex] received everything.

2019-11-26 20:16:39 | [Mutex] isItemNotified: published:item:notifieditem-f19d45cc-6ed0-459a-b674-443b400a1b56:admin@localhost :: true

retractItemsFromNodes 0.059s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

2019-11-26 20:16:39 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56"
}

2019-11-26 20:16:39 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56"
}

2019-11-26 20:16:39 | [Mutex] received everything.

2019-11-26 20:16:39 | [Mutex] isItemNotified: retracted:item:notifieditem-f19d45cc-6ed0-459a-b674-443b400a1b56:admin@localhost :: true

retrieveItemsFromNodes 0.052s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

2019-11-26 20:16:39 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56"
}

2019-11-26 20:16:39 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "item-id": "item-f19d45cc-6ed0-459a-b674-443b400a1b56",
    "item": [
        "<item id=\"item-f19d45cc-6ed0-459a-b674-443b400a1b56\"><test>item-f19d45cc-6ed0-459a-b674-443b400a1b56</test></item>"
    ]
}

2019-11-26 20:16:39 | [Mutex] notify: [retrieved:item:item-f19d45cc-6ed0-459a-b674-443b400a1b56:payload-matches:true:localhost]

2019-11-26 20:16:39 | [Mutex] received everything.

2019-11-26 20:16:39 | [Mutex] isItemNotified: retrieved:item:item-f19d45cc-6ed0-459a-b674-443b400a1b56:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.055s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

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

2019-11-26 20:16:39 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
        "node-5ac00b47-bd22-402b-8aa2-ceaa3e527f0a"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

2019-11-26 20:16:39 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-2681d0ff-4ad4-40ea-bf92-ab213190402d)"
}

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

subscribeNodes 1.012s
2019-11-26 20:16:38 |

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

2019-11-26 20:16:38 | ------------------------------------

2019-11-26 20:16:38 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.079s
2019-11-26 20:16:39 |

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

2019-11-26 20:16:39 | ------------------------------------

2019-11-26 20:16:39 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-2681d0ff-4ad4-40ea-bf92-ab213190402d",
    "jids": [
        "admin@localhost"
    ]
}

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