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

Test duration: 8.866s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.121s
2020-06-24 22:52:29 |

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

2020-06-24 22:52:29 | ------------------------------------

2020-06-24 22:52:29 | [Mutex] waiting for: [configured:node:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:node-ba560d25-bd28-490e-a128-c84c4b00bfbb]

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

2020-06-24 22:52:29 | [Mutex] isItemNotified: configured:node:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:node-ba560d25-bd28-490e-a128-c84c4b00bfbb :: true

2020-06-24 22:52:30 | [Mutex] waiting for: [received:nodes:8c2950de-8a83-4e35-a0f2-51da43d1d54f:localhost]

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

2020-06-24 22:52:30 | [Mutex] isItemNotified: received:node:8c2950de-8a83-4e35-a0f2-51da43d1d54f:localhost:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:Node 38919bc2-4abf-45e4-b4be-720f23fb77e9 :: true

2020-06-24 22:52:30 | [Mutex] waiting for: [received:nodes:3a7657d8-e776-4bdb-9177-06576474095e:localhost]

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

2020-06-24 22:52:30 | [Mutex] isItemNotified: received:node:3a7657d8-e776-4bdb-9177-06576474095e:localhost:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:Node 38919bc2-4abf-45e4-b4be-720f23fb77e9 :: false

createNodes 1.595s
2020-06-24 22:52:26 |

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

2020-06-24 22:52:26 | ------------------------------------

2020-06-24 22:52:26 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "pubsub#title": "Node 38919bc2-4abf-45e4-b4be-720f23fb77e9"
}

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

2020-06-24 22:52:28 | [Mutex] waiting for: [received:nodes:8f0c0e74-626b-40bd-83dc-acbe1ff83095:localhost]

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

2020-06-24 22:52:28 | [Mutex] isItemNotified: received:node:8f0c0e74-626b-40bd-83dc-acbe1ff83095:localhost:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:Node 38919bc2-4abf-45e4-b4be-720f23fb77e9 :: true

createSubnodes 1.026s
2020-06-24 22:52:28 |

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

2020-06-24 22:52:28 | ------------------------------------

2020-06-24 22:52:28 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-ba560d25-bd28-490e-a128-c84c4b00bfbb",
    "pubsub#title": "Node ba560d25-bd28-490e-a128-c84c4b00bfbb"
}

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

2020-06-24 22:52:29 | [Mutex] waiting for: [received:nodes:07bf4faa-e340-4c96-8c51-afe6c7bd81b0:localhost]

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

2020-06-24 22:52:29 | [Mutex] isItemNotified: received:node:07bf4faa-e340-4c96-8c51-afe6c7bd81b0:localhost:node-ba560d25-bd28-490e-a128-c84c4b00bfbb:Node ba560d25-bd28-490e-a128-c84c4b00bfbb :: true

deleteNodes 1.016s
2020-06-24 22:52:33 |

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

2020-06-24 22:52:33 | ------------------------------------

2020-06-24 22:52:33 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-ba560d25-bd28-490e-a128-c84c4b00bfbb"
}

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

2020-06-24 22:52:34 | [Mutex] waiting for: [received:nodes:78923613-8f29-41e8-a68d-aa338a62cc49:localhost]

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

2020-06-24 22:52:34 | [Mutex] isItemNotified: received:node:78923613-8f29-41e8-a68d-aa338a62cc49:localhost:node-ba560d25-bd28-490e-a128-c84c4b00bfbb:Node ba560d25-bd28-490e-a128-c84c4b00bfbb :: false

deleteSubnodes 1.025s
2020-06-24 22:52:32 |

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

2020-06-24 22:52:32 | ------------------------------------

2020-06-24 22:52:32 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9"
}

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

2020-06-24 22:52:33 | [Mutex] waiting for: [received:nodes:4719163d-e1b5-46cd-b983-057b97d0a70c:localhost]

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

2020-06-24 22:52:33 | [Mutex] isItemNotified: received:node:4719163d-e1b5-46cd-b983-057b97d0a70c:localhost:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:Node 38919bc2-4abf-45e4-b4be-720f23fb77e9 :: false

2020-06-24 22:52:33 | [Mutex] waiting for: [received:nodes:f2534e3c-5aa0-4bba-b62d-c65dee86d021:localhost]

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

2020-06-24 22:52:33 | [Mutex] isItemNotified: received:node:f2534e3c-5aa0-4bba-b62d-c65dee86d021:localhost:node-38919bc2-4abf-45e4-b4be-720f23fb77e9:Node 38919bc2-4abf-45e4-b4be-720f23fb77e9 :: false

publishItemsToNodes 0.042s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

2020-06-24 22:52:31 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "entry": "<test>item-a3d555ac-7056-433e-8460-1b661285a6e8</test>",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8"
}

2020-06-24 22:52:31 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8"
}

2020-06-24 22:52:31 | [Mutex] waiting for: [published:item:notifieditem-a3d555ac-7056-433e-8460-1b661285a6e8:admin@localhost]

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

2020-06-24 22:52:31 | [Mutex] isItemNotified: published:item:notifieditem-a3d555ac-7056-433e-8460-1b661285a6e8:admin@localhost :: true

retractItemsFromNodes 0.054s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

2020-06-24 22:52:31 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8"
}

2020-06-24 22:52:31 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8"
}

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

2020-06-24 22:52:31 | [Mutex] isItemNotified: retracted:item:notifieditem-a3d555ac-7056-433e-8460-1b661285a6e8:admin@localhost :: true

retrieveItemsFromNodes 0.056s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

2020-06-24 22:52:31 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8"
}

2020-06-24 22:52:31 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "item-id": "item-a3d555ac-7056-433e-8460-1b661285a6e8",
    "item": [
        "<item id=\"item-a3d555ac-7056-433e-8460-1b661285a6e8\"><test>item-a3d555ac-7056-433e-8460-1b661285a6e8</test></item>"
    ]
}

2020-06-24 22:52:31 | [Mutex] notify: [retrieved:item:item-a3d555ac-7056-433e-8460-1b661285a6e8:payload-matches:true:localhost]

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

2020-06-24 22:52:31 | [Mutex] isItemNotified: retrieved:item:item-a3d555ac-7056-433e-8460-1b661285a6e8:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

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

2020-06-24 22:52:31 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "test",
        "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
        "node-ba560d25-bd28-490e-a128-c84c4b00bfbb"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

2020-06-24 22:52:31 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-38919bc2-4abf-45e4-b4be-720f23fb77e9)"
}

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

subscribeNodes 1.010s
2020-06-24 22:52:30 |

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

2020-06-24 22:52:30 | ------------------------------------

2020-06-24 22:52:30 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.069s
2020-06-24 22:52:31 |

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

2020-06-24 22:52:31 | ------------------------------------

2020-06-24 22:52:31 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-38919bc2-4abf-45e4-b4be-720f23fb77e9",
    "jids": [
        "admin@localhost"
    ]
}

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