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

Test duration: 8.988s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.090s
2019-11-26 20:54:59 |

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

2019-11-26 20:54:59 | ------------------------------------

2019-11-26 20:54:59 | [Mutex] waiting for: [configured:node:node-7c91d419-b6b2-4707-b4a3-c1217043102a:node-8edbca24-c5b6-4918-b5de-17402f6d4ca6]

2019-11-26 20:54:59 | [Mutex] received everything.

2019-11-26 20:54:59 | [Mutex] isItemNotified: configured:node:node-7c91d419-b6b2-4707-b4a3-c1217043102a:node-8edbca24-c5b6-4918-b5de-17402f6d4ca6 :: true

2019-11-26 20:55:00 | [Mutex] waiting for: [received:nodes:127b5add-8ac5-4ed8-8d95-bea41fb72c90:localhost]

2019-11-26 20:55:00 | [Mutex] received everything.

2019-11-26 20:55:00 | [Mutex] isItemNotified: received:node:127b5add-8ac5-4ed8-8d95-bea41fb72c90:localhost:node-7c91d419-b6b2-4707-b4a3-c1217043102a:Node 7c91d419-b6b2-4707-b4a3-c1217043102a :: true

2019-11-26 20:55:00 | [Mutex] waiting for: [received:nodes:28681a70-de75-4f77-86ba-31b56d1ba903:localhost]

2019-11-26 20:55:00 | [Mutex] received everything.

2019-11-26 20:55:00 | [Mutex] isItemNotified: received:node:28681a70-de75-4f77-86ba-31b56d1ba903:localhost:node-7c91d419-b6b2-4707-b4a3-c1217043102a:Node 7c91d419-b6b2-4707-b4a3-c1217043102a :: false

createNodes 1.699s
2019-11-26 20:54:56 |

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

2019-11-26 20:54:56 | ------------------------------------

2019-11-26 20:54:57 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "pubsub#title": "Node 7c91d419-b6b2-4707-b4a3-c1217043102a"
}

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

2019-11-26 20:54:58 | [Mutex] waiting for: [received:nodes:daf15667-8040-492d-ba0e-01e4a6e99f13:localhost]

2019-11-26 20:54:58 | [Mutex] received everything.

2019-11-26 20:54:58 | [Mutex] isItemNotified: received:node:daf15667-8040-492d-ba0e-01e4a6e99f13:localhost:node-7c91d419-b6b2-4707-b4a3-c1217043102a:Node 7c91d419-b6b2-4707-b4a3-c1217043102a :: true

createSubnodes 1.027s
2019-11-26 20:54:58 |

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

2019-11-26 20:54:58 | ------------------------------------

2019-11-26 20:54:58 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-8edbca24-c5b6-4918-b5de-17402f6d4ca6",
    "pubsub#title": "Node 8edbca24-c5b6-4918-b5de-17402f6d4ca6"
}

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

2019-11-26 20:54:59 | [Mutex] waiting for: [received:nodes:2204f446-6df5-4923-aabb-4f9512ecd5ca:localhost]

2019-11-26 20:54:59 | [Mutex] received everything.

2019-11-26 20:54:59 | [Mutex] isItemNotified: received:node:2204f446-6df5-4923-aabb-4f9512ecd5ca:localhost:node-8edbca24-c5b6-4918-b5de-17402f6d4ca6:Node 8edbca24-c5b6-4918-b5de-17402f6d4ca6 :: true

deleteNodes 1.019s
2019-11-26 20:55:03 |

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

2019-11-26 20:55:03 | ------------------------------------

2019-11-26 20:55:03 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-8edbca24-c5b6-4918-b5de-17402f6d4ca6"
}

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

2019-11-26 20:55:04 | [Mutex] waiting for: [received:nodes:ba0913a2-c11f-4eec-abb6-7fc2208e722c:localhost]

2019-11-26 20:55:04 | [Mutex] received everything.

2019-11-26 20:55:04 | [Mutex] isItemNotified: received:node:ba0913a2-c11f-4eec-abb6-7fc2208e722c:localhost:node-8edbca24-c5b6-4918-b5de-17402f6d4ca6:Node 8edbca24-c5b6-4918-b5de-17402f6d4ca6 :: false

deleteSubnodes 1.026s
2019-11-26 20:55:02 |

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

2019-11-26 20:55:02 | ------------------------------------

2019-11-26 20:55:02 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a"
}

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

2019-11-26 20:55:03 | [Mutex] waiting for: [received:nodes:817f2cc0-f45d-4666-8ced-ac0ec772a5a8:localhost]

2019-11-26 20:55:03 | [Mutex] received everything.

2019-11-26 20:55:03 | [Mutex] isItemNotified: received:node:817f2cc0-f45d-4666-8ced-ac0ec772a5a8:localhost:node-7c91d419-b6b2-4707-b4a3-c1217043102a:Node 7c91d419-b6b2-4707-b4a3-c1217043102a :: false

2019-11-26 20:55:03 | [Mutex] waiting for: [received:nodes:5354a8b7-7d59-44ea-966b-313ec8a40d22:localhost]

2019-11-26 20:55:03 | [Mutex] received everything.

2019-11-26 20:55:03 | [Mutex] isItemNotified: received:node:5354a8b7-7d59-44ea-966b-313ec8a40d22:localhost:node-7c91d419-b6b2-4707-b4a3-c1217043102a:Node 7c91d419-b6b2-4707-b4a3-c1217043102a :: false

publishItemsToNodes 0.027s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

2019-11-26 20:55:01 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "entry": "<test>item-efd43e53-cf73-4347-b0cc-a551e8e86b97</test>",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97"
}

2019-11-26 20:55:01 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97"
}

2019-11-26 20:55:01 | [Mutex] waiting for: [published:item:notifieditem-efd43e53-cf73-4347-b0cc-a551e8e86b97:admin@localhost]

2019-11-26 20:55:01 | [Mutex] received everything.

2019-11-26 20:55:01 | [Mutex] isItemNotified: published:item:notifieditem-efd43e53-cf73-4347-b0cc-a551e8e86b97:admin@localhost :: true

retractItemsFromNodes 0.055s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

2019-11-26 20:55:01 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97"
}

2019-11-26 20:55:01 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97"
}

2019-11-26 20:55:01 | [Mutex] received everything.

2019-11-26 20:55:01 | [Mutex] isItemNotified: retracted:item:notifieditem-efd43e53-cf73-4347-b0cc-a551e8e86b97:admin@localhost :: true

retrieveItemsFromNodes 0.065s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

2019-11-26 20:55:01 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97"
}

2019-11-26 20:55:01 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "item-id": "item-efd43e53-cf73-4347-b0cc-a551e8e86b97",
    "item": [
        "<item id=\"item-efd43e53-cf73-4347-b0cc-a551e8e86b97\"><test>item-efd43e53-cf73-4347-b0cc-a551e8e86b97</test></item>"
    ]
}

2019-11-26 20:55:01 | [Mutex] notify: [retrieved:item:item-efd43e53-cf73-4347-b0cc-a551e8e86b97:payload-matches:true:localhost]

2019-11-26 20:55:01 | [Mutex] received everything.

2019-11-26 20:55:01 | [Mutex] isItemNotified: retrieved:item:item-efd43e53-cf73-4347-b0cc-a551e8e86b97:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

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

2019-11-26 20:55:01 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
        "node-8edbca24-c5b6-4918-b5de-17402f6d4ca6"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

2019-11-26 20:55:01 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-7c91d419-b6b2-4707-b4a3-c1217043102a)"
}

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

subscribeNodes 1.010s
2019-11-26 20:55:00 |

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

2019-11-26 20:55:00 | ------------------------------------

2019-11-26 20:55:00 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.067s
2019-11-26 20:55:01 |

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

2019-11-26 20:55:01 | ------------------------------------

2019-11-26 20:55:01 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-7c91d419-b6b2-4707-b4a3-c1217043102a",
    "jids": [
        "admin@localhost"
    ]
}

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