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

Test duration: 8.931s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.131s
2020-04-30 00:22:02 |

2020-04-30 00:22:02 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:02 | ------------------------------------

2020-04-30 00:22:02 | [Mutex] waiting for: [configured:node:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9]

2020-04-30 00:22:02 | [Mutex] received everything.

2020-04-30 00:22:02 | [Mutex] isItemNotified: configured:node:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9 :: true

2020-04-30 00:22:03 | [Mutex] waiting for: [received:nodes:2bd607c6-8414-42dc-a167-9c26261d527d:localhost]

2020-04-30 00:22:03 | [Mutex] received everything.

2020-04-30 00:22:03 | [Mutex] isItemNotified: received:node:2bd607c6-8414-42dc-a167-9c26261d527d:localhost:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:Node b1e10105-886b-4fac-8f7c-5568b1e93dcb :: true

2020-04-30 00:22:03 | [Mutex] waiting for: [received:nodes:6dbfec4f-b98c-41d0-8da4-556adf798829:localhost]

2020-04-30 00:22:03 | [Mutex] received everything.

2020-04-30 00:22:03 | [Mutex] isItemNotified: received:node:6dbfec4f-b98c-41d0-8da4-556adf798829:localhost:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:Node b1e10105-886b-4fac-8f7c-5568b1e93dcb :: false

createNodes 1.524s
2020-04-30 00:21:59 |

2020-04-30 00:21:59 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:21:59 | ------------------------------------

2020-04-30 00:22:00 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "pubsub#title": "Node b1e10105-886b-4fac-8f7c-5568b1e93dcb"
}

2020-04-30 00:22:00 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-04-30 00:22:01 | [Mutex] waiting for: [received:nodes:a254921e-44df-4978-a96e-d70c8ea11e4f:localhost]

2020-04-30 00:22:01 | [Mutex] received everything.

2020-04-30 00:22:01 | [Mutex] isItemNotified: received:node:a254921e-44df-4978-a96e-d70c8ea11e4f:localhost:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:Node b1e10105-886b-4fac-8f7c-5568b1e93dcb :: true

createSubnodes 1.022s
2020-04-30 00:22:01 |

2020-04-30 00:22:01 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:01 | ------------------------------------

2020-04-30 00:22:01 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9",
    "pubsub#title": "Node 5a3489ce-5f1a-4fd7-9298-0e8054198bf9"
}

2020-04-30 00:22:01 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-04-30 00:22:02 | [Mutex] waiting for: [received:nodes:deec82ec-65d8-4cf8-9d3d-f15f19526396:localhost]

2020-04-30 00:22:02 | [Mutex] waiting for: [received:nodes:deec82ec-65d8-4cf8-9d3d-f15f19526396:localhost]

2020-04-30 00:22:02 | [Mutex] received everything.

2020-04-30 00:22:02 | [Mutex] isItemNotified: received:node:deec82ec-65d8-4cf8-9d3d-f15f19526396:localhost:node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9:Node 5a3489ce-5f1a-4fd7-9298-0e8054198bf9 :: true

deleteNodes 1.019s
2020-04-30 00:22:06 |

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

2020-04-30 00:22:06 | ------------------------------------

2020-04-30 00:22:06 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9"
}

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

2020-04-30 00:22:07 | [Mutex] waiting for: [received:nodes:ce38d497-2e56-4b0c-9363-3722b93af284:localhost]

2020-04-30 00:22:07 | [Mutex] waiting for: [received:nodes:ce38d497-2e56-4b0c-9363-3722b93af284:localhost]

2020-04-30 00:22:07 | [Mutex] received everything.

2020-04-30 00:22:07 | [Mutex] isItemNotified: received:node:ce38d497-2e56-4b0c-9363-3722b93af284:localhost:node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9:Node 5a3489ce-5f1a-4fd7-9298-0e8054198bf9 :: false

deleteSubnodes 1.031s
2020-04-30 00:22:05 |

2020-04-30 00:22:05 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:05 | ------------------------------------

2020-04-30 00:22:05 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb"
}

2020-04-30 00:22:05 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-04-30 00:22:06 | [Mutex] waiting for: [received:nodes:b6bf15f3-8395-4423-984e-8003a9f528c1:localhost]

2020-04-30 00:22:06 | [Mutex] received everything.

2020-04-30 00:22:06 | [Mutex] isItemNotified: received:node:b6bf15f3-8395-4423-984e-8003a9f528c1:localhost:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:Node b1e10105-886b-4fac-8f7c-5568b1e93dcb :: false

2020-04-30 00:22:06 | [Mutex] waiting for: [received:nodes:6d695b69-cf99-46f0-9943-8c2ccc93a812:localhost]

2020-04-30 00:22:06 | [Mutex] received everything.

2020-04-30 00:22:06 | [Mutex] isItemNotified: received:node:6d695b69-cf99-46f0-9943-8c2ccc93a812:localhost:node-b1e10105-886b-4fac-8f7c-5568b1e93dcb:Node b1e10105-886b-4fac-8f7c-5568b1e93dcb :: false

publishItemsToNodes 0.042s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "entry": "<test>item-e9ca6a06-0c68-4755-89d9-86697a83d8e0</test>",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0"
}

2020-04-30 00:22:04 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0"
}

2020-04-30 00:22:04 | [Mutex] waiting for: [published:item:notifieditem-e9ca6a06-0c68-4755-89d9-86697a83d8e0:admin@localhost]

2020-04-30 00:22:04 | [Mutex] received everything.

2020-04-30 00:22:04 | [Mutex] isItemNotified: published:item:notifieditem-e9ca6a06-0c68-4755-89d9-86697a83d8e0:admin@localhost :: true

retractItemsFromNodes 0.052s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0"
}

2020-04-30 00:22:04 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0"
}

2020-04-30 00:22:04 | [Mutex] received everything.

2020-04-30 00:22:04 | [Mutex] isItemNotified: retracted:item:notifieditem-e9ca6a06-0c68-4755-89d9-86697a83d8e0:admin@localhost :: true

retrieveItemsFromNodes 0.064s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0"
}

2020-04-30 00:22:04 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "item-id": "item-e9ca6a06-0c68-4755-89d9-86697a83d8e0",
    "item": [
        "<item id=\"item-e9ca6a06-0c68-4755-89d9-86697a83d8e0\"><test>item-e9ca6a06-0c68-4755-89d9-86697a83d8e0</test></item>"
    ]
}

2020-04-30 00:22:04 | [Mutex] notify: [retrieved:item:item-e9ca6a06-0c68-4755-89d9-86697a83d8e0:payload-matches:true:localhost]

2020-04-30 00:22:04 | [Mutex] received everything.

2020-04-30 00:22:04 | [Mutex] isItemNotified: retrieved:item:item-e9ca6a06-0c68-4755-89d9-86697a83d8e0:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-04-30 00:22:04 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-5a3489ce-5f1a-4fd7-9298-0e8054198bf9",
        "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-b1e10105-886b-4fac-8f7c-5568b1e93dcb)"
}

2020-04-30 00:22:04 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.015s
2020-04-30 00:22:03 |

2020-04-30 00:22:03 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:03 | ------------------------------------

2020-04-30 00:22:03 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.060s
2020-04-30 00:22:04 |

2020-04-30 00:22:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-04-30 00:22:04 | ------------------------------------

2020-04-30 00:22:04 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-b1e10105-886b-4fac-8f7c-5568b1e93dcb",
    "jids": [
        "admin@localhost"
    ]
}

2020-04-30 00:22:04 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}