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

Test duration: 8.685s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.098s
2020-03-29 22:45:14 |

2020-03-29 22:45:14 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:14 | ------------------------------------

2020-03-29 22:45:14 | [Mutex] waiting for: [configured:node:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:node-bba9e364-f7ad-4a4f-b4fe-573d75b97856]

2020-03-29 22:45:14 | [Mutex] received everything.

2020-03-29 22:45:14 | [Mutex] isItemNotified: configured:node:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:node-bba9e364-f7ad-4a4f-b4fe-573d75b97856 :: true

2020-03-29 22:45:15 | [Mutex] waiting for: [received:nodes:b91e06ac-3400-4520-be63-c9da8fb4ace5:localhost]

2020-03-29 22:45:15 | [Mutex] received everything.

2020-03-29 22:45:15 | [Mutex] isItemNotified: received:node:b91e06ac-3400-4520-be63-c9da8fb4ace5:localhost:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c :: true

2020-03-29 22:45:15 | [Mutex] waiting for: [received:nodes:cfbbb688-e2ce-462a-a75a-61ab22fd2046:localhost]

2020-03-29 22:45:15 | [Mutex] received everything.

2020-03-29 22:45:15 | [Mutex] isItemNotified: received:node:cfbbb688-e2ce-462a-a75a-61ab22fd2046:localhost:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c :: false

createNodes 1.551s
2020-03-29 22:45:11 |

2020-03-29 22:45:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:11 | ------------------------------------

2020-03-29 22:45:12 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "pubsub#title": "Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c"
}

2020-03-29 22:45:12 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-03-29 22:45:13 | [Mutex] waiting for: [received:nodes:4fd888bf-1d55-40d2-92c3-8b19ef6d06f4:localhost]

2020-03-29 22:45:13 | [Mutex] received everything.

2020-03-29 22:45:13 | [Mutex] isItemNotified: received:node:4fd888bf-1d55-40d2-92c3-8b19ef6d06f4:localhost:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c :: true

createSubnodes 1.021s
2020-03-29 22:45:13 |

2020-03-29 22:45:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:13 | ------------------------------------

2020-03-29 22:45:13 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-bba9e364-f7ad-4a4f-b4fe-573d75b97856",
    "pubsub#title": "Node bba9e364-f7ad-4a4f-b4fe-573d75b97856"
}

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

2020-03-29 22:45:14 | [Mutex] waiting for: [received:nodes:956b451a-fc34-4a60-8aab-153dc0ce98af:localhost]

2020-03-29 22:45:14 | [Mutex] waiting for: [received:nodes:956b451a-fc34-4a60-8aab-153dc0ce98af:localhost]

2020-03-29 22:45:14 | [Mutex] received everything.

2020-03-29 22:45:14 | [Mutex] isItemNotified: received:node:956b451a-fc34-4a60-8aab-153dc0ce98af:localhost:node-bba9e364-f7ad-4a4f-b4fe-573d75b97856:Node bba9e364-f7ad-4a4f-b4fe-573d75b97856 :: true

deleteNodes 1.016s
2020-03-29 22:45:18 |

2020-03-29 22:45:18 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:18 | ------------------------------------

2020-03-29 22:45:18 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-bba9e364-f7ad-4a4f-b4fe-573d75b97856"
}

2020-03-29 22:45:18 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-03-29 22:45:19 | [Mutex] waiting for: [received:nodes:cd5b3f8e-9ad3-4f7a-80c8-0d1282d812ba:localhost]

2020-03-29 22:45:19 | [Mutex] received everything.

2020-03-29 22:45:19 | [Mutex] isItemNotified: received:node:cd5b3f8e-9ad3-4f7a-80c8-0d1282d812ba:localhost:node-bba9e364-f7ad-4a4f-b4fe-573d75b97856:Node bba9e364-f7ad-4a4f-b4fe-573d75b97856 :: false

deleteSubnodes 1.022s
2020-03-29 22:45:17 |

2020-03-29 22:45:17 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:17 | ------------------------------------

2020-03-29 22:45:17 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c"
}

2020-03-29 22:45:17 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-03-29 22:45:18 | [Mutex] waiting for: [received:nodes:3b0be407-af9c-40bc-9809-57150e9b60e4:localhost]

2020-03-29 22:45:18 | [Mutex] received everything.

2020-03-29 22:45:18 | [Mutex] isItemNotified: received:node:3b0be407-af9c-40bc-9809-57150e9b60e4:localhost:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c :: false

2020-03-29 22:45:18 | [Mutex] waiting for: [received:nodes:10e8e5a0-ccbf-49cc-ab58-d34e89bc278d:localhost]

2020-03-29 22:45:18 | [Mutex] received everything.

2020-03-29 22:45:18 | [Mutex] isItemNotified: received:node:10e8e5a0-ccbf-49cc-ab58-d34e89bc278d:localhost:node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c:Node 3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c :: false

publishItemsToNodes 0.052s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "entry": "<test>item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c</test>",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c"
}

2020-03-29 22:45:16 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c"
}

2020-03-29 22:45:16 | [Mutex] waiting for: [published:item:notifieditem-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c:admin@localhost]

2020-03-29 22:45:16 | [Mutex] received everything.

2020-03-29 22:45:16 | [Mutex] isItemNotified: published:item:notifieditem-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c:admin@localhost :: true

retractItemsFromNodes 0.059s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c"
}

2020-03-29 22:45:16 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c"
}

2020-03-29 22:45:16 | [Mutex] received everything.

2020-03-29 22:45:16 | [Mutex] isItemNotified: retracted:item:notifieditem-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c:admin@localhost :: true

retrieveItemsFromNodes 0.055s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c"
}

2020-03-29 22:45:16 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "item-id": "item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c",
    "item": [
        "<item id=\"item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c\"><test>item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c</test></item>"
    ]
}

2020-03-29 22:45:16 | [Mutex] notify: [retrieved:item:item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c:payload-matches:true:localhost]

2020-03-29 22:45:16 | [Mutex] received everything.

2020-03-29 22:45:16 | [Mutex] isItemNotified: retrieved:item:item-0aa15883-0d14-4dc4-bad8-eb40c53e1e9c:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-03-29 22:45:16 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
        "node-bba9e364-f7ad-4a4f-b4fe-573d75b97856"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c)"
}

2020-03-29 22:45:16 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.010s
2020-03-29 22:45:15 |

2020-03-29 22:45:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:15 | ------------------------------------

2020-03-29 22:45:15 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "jids": [
        "admin@localhost"
    ]
}

2020-03-29 22:45:15 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.056s
2020-03-29 22:45:16 |

2020-03-29 22:45:16 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-03-29 22:45:16 | ------------------------------------

2020-03-29 22:45:16 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-3cfc61b9-a92a-4c5a-81d1-6cfdbf581a9c",
    "jids": [
        "admin@localhost"
    ]
}

2020-03-29 22:45:16 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}