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

Test duration: 8.932s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.094s
2019-12-12 20:42:43 |

2019-12-12 20:42:43 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:43 | ------------------------------------

2019-12-12 20:42:43 | [Mutex] waiting for: [configured:node:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:node-70dd9755-c33b-4a2c-9b69-e8e9323164b1]

2019-12-12 20:42:43 | [Mutex] received everything.

2019-12-12 20:42:43 | [Mutex] isItemNotified: configured:node:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:node-70dd9755-c33b-4a2c-9b69-e8e9323164b1 :: true

2019-12-12 20:42:44 | [Mutex] waiting for: [received:nodes:c9f2ef28-ae3e-42f5-bd07-a25dab4214c3:localhost]

2019-12-12 20:42:44 | [Mutex] received everything.

2019-12-12 20:42:44 | [Mutex] isItemNotified: received:node:c9f2ef28-ae3e-42f5-bd07-a25dab4214c3:localhost:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9 :: true

2019-12-12 20:42:44 | [Mutex] waiting for: [received:nodes:ade96fd0-d582-4960-be24-6916a51af0b4:localhost]

2019-12-12 20:42:44 | [Mutex] received everything.

2019-12-12 20:42:44 | [Mutex] isItemNotified: received:node:ade96fd0-d582-4960-be24-6916a51af0b4:localhost:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9 :: false

createNodes 1.750s
2019-12-12 20:42:40 |

2019-12-12 20:42:40 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:40 | ------------------------------------

2019-12-12 20:42:41 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "pubsub#title": "Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9"
}

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

2019-12-12 20:42:42 | [Mutex] waiting for: [received:nodes:ffd2de91-2cd7-49c7-9888-be07fb93181b:localhost]

2019-12-12 20:42:42 | [Mutex] received everything.

2019-12-12 20:42:42 | [Mutex] isItemNotified: received:node:ffd2de91-2cd7-49c7-9888-be07fb93181b:localhost:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9 :: true

createSubnodes 1.027s
2019-12-12 20:42:42 |

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

2019-12-12 20:42:42 | ------------------------------------

2019-12-12 20:42:42 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-70dd9755-c33b-4a2c-9b69-e8e9323164b1",
    "pubsub#title": "Node 70dd9755-c33b-4a2c-9b69-e8e9323164b1"
}

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

2019-12-12 20:42:43 | [Mutex] waiting for: [received:nodes:2b22c66a-be6e-4809-b3e8-6702c67ccc32:localhost]

2019-12-12 20:42:43 | [Mutex] received everything.

2019-12-12 20:42:43 | [Mutex] isItemNotified: received:node:2b22c66a-be6e-4809-b3e8-6702c67ccc32:localhost:node-70dd9755-c33b-4a2c-9b69-e8e9323164b1:Node 70dd9755-c33b-4a2c-9b69-e8e9323164b1 :: true

deleteNodes 1.016s
2019-12-12 20:42:47 |

2019-12-12 20:42:47 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:47 | ------------------------------------

2019-12-12 20:42:47 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-70dd9755-c33b-4a2c-9b69-e8e9323164b1"
}

2019-12-12 20:42:47 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-12 20:42:48 | [Mutex] waiting for: [received:nodes:c585cabf-7110-4b9f-97ea-b34144e3a61f:localhost]

2019-12-12 20:42:48 | [Mutex] received everything.

2019-12-12 20:42:48 | [Mutex] isItemNotified: received:node:c585cabf-7110-4b9f-97ea-b34144e3a61f:localhost:node-70dd9755-c33b-4a2c-9b69-e8e9323164b1:Node 70dd9755-c33b-4a2c-9b69-e8e9323164b1 :: false

deleteSubnodes 1.029s
2019-12-12 20:42:46 |

2019-12-12 20:42:46 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:46 | ------------------------------------

2019-12-12 20:42:46 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9"
}

2019-12-12 20:42:46 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-12 20:42:47 | [Mutex] waiting for: [received:nodes:0fdfc3f6-1786-4502-808e-faa0f6e07f10:localhost]

2019-12-12 20:42:47 | [Mutex] received everything.

2019-12-12 20:42:47 | [Mutex] isItemNotified: received:node:0fdfc3f6-1786-4502-808e-faa0f6e07f10:localhost:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9 :: false

2019-12-12 20:42:47 | [Mutex] waiting for: [received:nodes:830a00a4-f487-43ba-8395-b492294c449b:localhost]

2019-12-12 20:42:47 | [Mutex] received everything.

2019-12-12 20:42:47 | [Mutex] isItemNotified: received:node:830a00a4-f487-43ba-8395-b492294c449b:localhost:node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9:Node 06c1cd51-d204-45f5-8d94-52ffcf61d6c9 :: false

publishItemsToNodes 0.036s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "entry": "<test>item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30</test>",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30"
}

2019-12-12 20:42:45 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30"
}

2019-12-12 20:42:45 | [Mutex] waiting for: [published:item:notifieditem-8da41850-9a5e-45f9-ab95-1e1dc1e81d30:admin@localhost]

2019-12-12 20:42:45 | [Mutex] received everything.

2019-12-12 20:42:45 | [Mutex] isItemNotified: published:item:notifieditem-8da41850-9a5e-45f9-ab95-1e1dc1e81d30:admin@localhost :: true

retractItemsFromNodes 0.051s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30"
}

2019-12-12 20:42:45 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30"
}

2019-12-12 20:42:45 | [Mutex] received everything.

2019-12-12 20:42:45 | [Mutex] isItemNotified: retracted:item:notifieditem-8da41850-9a5e-45f9-ab95-1e1dc1e81d30:admin@localhost :: true

retrieveItemsFromNodes 0.063s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30"
}

2019-12-12 20:42:45 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "item-id": "item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30",
    "item": [
        "<item id=\"item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30\"><test>item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30</test></item>"
    ]
}

2019-12-12 20:42:45 | [Mutex] notify: [retrieved:item:item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30:payload-matches:true:localhost]

2019-12-12 20:42:45 | [Mutex] received everything.

2019-12-12 20:42:45 | [Mutex] isItemNotified: retrieved:item:item-8da41850-9a5e-45f9-ab95-1e1dc1e81d30:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.050s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-12-12 20:42:45 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-70dd9755-c33b-4a2c-9b69-e8e9323164b1",
        "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9)"
}

2019-12-12 20:42:45 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.015s
2019-12-12 20:42:44 |

2019-12-12 20:42:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:44 | ------------------------------------

2019-12-12 20:42:44 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "jids": [
        "admin@localhost"
    ]
}

2019-12-12 20:42:44 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.063s
2019-12-12 20:42:45 |

2019-12-12 20:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-12 20:42:45 | ------------------------------------

2019-12-12 20:42:45 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-06c1cd51-d204-45f5-8d94-52ffcf61d6c9",
    "jids": [
        "admin@localhost"
    ]
}

2019-12-12 20:42:45 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}