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

Test duration: 8.836s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.102s
2020-06-02 13:42:46 |

2020-06-02 13:42:46 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:46 | ------------------------------------

2020-06-02 13:42:46 | [Mutex] waiting for: [configured:node:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:node-10d9f278-efdc-4ce0-9736-2974b1debd4a]

2020-06-02 13:42:46 | [Mutex] received everything.

2020-06-02 13:42:46 | [Mutex] isItemNotified: configured:node:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:node-10d9f278-efdc-4ce0-9736-2974b1debd4a :: true

2020-06-02 13:42:47 | [Mutex] waiting for: [received:nodes:7d4d6b81-00ee-499e-aef4-32e9e84b5409:localhost]

2020-06-02 13:42:47 | [Mutex] received everything.

2020-06-02 13:42:47 | [Mutex] isItemNotified: received:node:7d4d6b81-00ee-499e-aef4-32e9e84b5409:localhost:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44 :: true

2020-06-02 13:42:47 | [Mutex] waiting for: [received:nodes:ada44c72-15df-487a-a27b-92f9d78237ac:localhost]

2020-06-02 13:42:47 | [Mutex] received everything.

2020-06-02 13:42:47 | [Mutex] isItemNotified: received:node:ada44c72-15df-487a-a27b-92f9d78237ac:localhost:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44 :: false

createNodes 1.591s
2020-06-02 13:42:43 |

2020-06-02 13:42:43 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:43 | ------------------------------------

2020-06-02 13:42:44 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "pubsub#title": "Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44"
}

2020-06-02 13:42:44 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-02 13:42:45 | [Mutex] waiting for: [received:nodes:757d4076-3acb-4993-9516-c9ed44187605:localhost]

2020-06-02 13:42:45 | [Mutex] received everything.

2020-06-02 13:42:45 | [Mutex] isItemNotified: received:node:757d4076-3acb-4993-9516-c9ed44187605:localhost:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44 :: true

createSubnodes 1.020s
2020-06-02 13:42:45 |

2020-06-02 13:42:45 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:45 | ------------------------------------

2020-06-02 13:42:45 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-10d9f278-efdc-4ce0-9736-2974b1debd4a",
    "pubsub#title": "Node 10d9f278-efdc-4ce0-9736-2974b1debd4a"
}

2020-06-02 13:42:45 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-02 13:42:46 | [Mutex] waiting for: [received:nodes:d4a8e64d-0fe6-4efe-875d-996e4c096f89:localhost]

2020-06-02 13:42:46 | [Mutex] received everything.

2020-06-02 13:42:46 | [Mutex] isItemNotified: received:node:d4a8e64d-0fe6-4efe-875d-996e4c096f89:localhost:node-10d9f278-efdc-4ce0-9736-2974b1debd4a:Node 10d9f278-efdc-4ce0-9736-2974b1debd4a :: true

deleteNodes 1.018s
2020-06-02 13:42:51 |

2020-06-02 13:42:51 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:51 | ------------------------------------

2020-06-02 13:42:51 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-10d9f278-efdc-4ce0-9736-2974b1debd4a"
}

2020-06-02 13:42:51 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-02 13:42:52 | [Mutex] waiting for: [received:nodes:8e7b96bf-8a00-4b2d-a3b3-d7a0d943a4e6:localhost]

2020-06-02 13:42:52 | [Mutex] received everything.

2020-06-02 13:42:52 | [Mutex] isItemNotified: received:node:8e7b96bf-8a00-4b2d-a3b3-d7a0d943a4e6:localhost:node-10d9f278-efdc-4ce0-9736-2974b1debd4a:Node 10d9f278-efdc-4ce0-9736-2974b1debd4a :: false

deleteSubnodes 1.026s
2020-06-02 13:42:50 |

2020-06-02 13:42:50 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:50 | ------------------------------------

2020-06-02 13:42:50 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44"
}

2020-06-02 13:42:50 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-02 13:42:51 | [Mutex] waiting for: [received:nodes:4e1a4434-3e87-49ff-b228-3edb2cbf47f8:localhost]

2020-06-02 13:42:51 | [Mutex] waiting for: [received:nodes:4e1a4434-3e87-49ff-b228-3edb2cbf47f8:localhost]

2020-06-02 13:42:51 | [Mutex] waiting for: [received:nodes:4e1a4434-3e87-49ff-b228-3edb2cbf47f8:localhost]

2020-06-02 13:42:51 | [Mutex] received everything.

2020-06-02 13:42:51 | [Mutex] isItemNotified: received:node:4e1a4434-3e87-49ff-b228-3edb2cbf47f8:localhost:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44 :: false

2020-06-02 13:42:51 | [Mutex] waiting for: [received:nodes:b58a9ac3-856d-4ad0-a371-c896fc5611e2:localhost]

2020-06-02 13:42:51 | [Mutex] received everything.

2020-06-02 13:42:51 | [Mutex] isItemNotified: received:node:b58a9ac3-856d-4ad0-a371-c896fc5611e2:localhost:node-2b8a5ee4-2493-4c30-a5cb-22b396047f44:Node 2b8a5ee4-2493-4c30-a5cb-22b396047f44 :: false

publishItemsToNodes 0.049s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "entry": "<test>item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37</test>",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37"
}

2020-06-02 13:42:48 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37"
}

2020-06-02 13:42:48 | [Mutex] waiting for: [published:item:notifieditem-c9d10420-4eed-4c97-aa5f-789b8d9b4c37:admin@localhost]

2020-06-02 13:42:48 | [Mutex] received everything.

2020-06-02 13:42:48 | [Mutex] isItemNotified: published:item:notifieditem-c9d10420-4eed-4c97-aa5f-789b8d9b4c37:admin@localhost :: true

retractItemsFromNodes 0.052s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37"
}

2020-06-02 13:42:48 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37"
}

2020-06-02 13:42:48 | [Mutex] received everything.

2020-06-02 13:42:48 | [Mutex] isItemNotified: retracted:item:notifieditem-c9d10420-4eed-4c97-aa5f-789b8d9b4c37:admin@localhost :: true

retrieveItemsFromNodes 0.014s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37"
}

2020-06-02 13:42:48 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "item-id": "item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37",
    "item": [
        "<item id=\"item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37\"><test>item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37</test></item>"
    ]
}

2020-06-02 13:42:48 | [Mutex] notify: [retrieved:item:item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37:payload-matches:true:localhost]

2020-06-02 13:42:48 | [Mutex] received everything.

2020-06-02 13:42:48 | [Mutex] isItemNotified: retrieved:item:item-c9d10420-4eed-4c97-aa5f-789b8d9b4c37:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-06-02 13:42:48 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-10d9f278-efdc-4ce0-9736-2974b1debd4a",
        "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44"
    ]
}

retrieveUserSubscriptionsWithRegex 0.052s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-2b8a5ee4-2493-4c30-a5cb-22b396047f44)"
}

2020-06-02 13:42:48 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.022s
2020-06-02 13:42:47 |

2020-06-02 13:42:47 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:47 | ------------------------------------

2020-06-02 13:42:47 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-02 13:42:47 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.092s
2020-06-02 13:42:48 |

2020-06-02 13:42:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-02 13:42:48 | ------------------------------------

2020-06-02 13:42:48 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-2b8a5ee4-2493-4c30-a5cb-22b396047f44",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-02 13:42:49 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}