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

Test duration: 9.041s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.117s
2019-12-03 19:13:09 |

2019-12-03 19:13:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:09 | ------------------------------------

2019-12-03 19:13:09 | [Mutex] waiting for: [configured:node:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:node-1b9c576d-0083-4b18-ab48-79a7fd911bc2]

2019-12-03 19:13:09 | [Mutex] received everything.

2019-12-03 19:13:09 | [Mutex] isItemNotified: configured:node:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:node-1b9c576d-0083-4b18-ab48-79a7fd911bc2 :: true

2019-12-03 19:13:10 | [Mutex] waiting for: [received:nodes:2c6f1033-8482-4492-822c-bf66ea4f078a:localhost]

2019-12-03 19:13:10 | [Mutex] received everything.

2019-12-03 19:13:10 | [Mutex] isItemNotified: received:node:2c6f1033-8482-4492-822c-bf66ea4f078a:localhost:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407 :: true

2019-12-03 19:13:10 | [Mutex] waiting for: [received:nodes:1a062e58-5f80-419d-a1a5-f13ce4c62a28:localhost]

2019-12-03 19:13:10 | [Mutex] received everything.

2019-12-03 19:13:10 | [Mutex] isItemNotified: received:node:1a062e58-5f80-419d-a1a5-f13ce4c62a28:localhost:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407 :: false

createNodes 1.766s
2019-12-03 19:13:06 |

2019-12-03 19:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:06 | ------------------------------------

2019-12-03 19:13:07 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "pubsub#title": "Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407"
}

2019-12-03 19:13:07 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-03 19:13:08 | [Mutex] waiting for: [received:nodes:9edce954-f7ed-4abc-8a72-76ce52e01c5a:localhost]

2019-12-03 19:13:08 | [Mutex] received everything.

2019-12-03 19:13:08 | [Mutex] isItemNotified: received:node:9edce954-f7ed-4abc-8a72-76ce52e01c5a:localhost:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407 :: true

createSubnodes 1.029s
2019-12-03 19:13:08 |

2019-12-03 19:13:08 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:08 | ------------------------------------

2019-12-03 19:13:08 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-1b9c576d-0083-4b18-ab48-79a7fd911bc2",
    "pubsub#title": "Node 1b9c576d-0083-4b18-ab48-79a7fd911bc2"
}

2019-12-03 19:13:08 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-03 19:13:09 | [Mutex] waiting for: [received:nodes:9a1cf21c-06e6-44c9-ad69-6bce80b0aa3c:localhost]

2019-12-03 19:13:09 | [Mutex] received everything.

2019-12-03 19:13:09 | [Mutex] isItemNotified: received:node:9a1cf21c-06e6-44c9-ad69-6bce80b0aa3c:localhost:node-1b9c576d-0083-4b18-ab48-79a7fd911bc2:Node 1b9c576d-0083-4b18-ab48-79a7fd911bc2 :: true

deleteNodes 1.019s
2019-12-03 19:13:13 |

2019-12-03 19:13:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:13 | ------------------------------------

2019-12-03 19:13:13 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-1b9c576d-0083-4b18-ab48-79a7fd911bc2"
}

2019-12-03 19:13:13 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-03 19:13:14 | [Mutex] waiting for: [received:nodes:e666374c-f9bc-433c-b99c-b2b5a7e34d2c:localhost]

2019-12-03 19:13:14 | [Mutex] received everything.

2019-12-03 19:13:14 | [Mutex] isItemNotified: received:node:e666374c-f9bc-433c-b99c-b2b5a7e34d2c:localhost:node-1b9c576d-0083-4b18-ab48-79a7fd911bc2:Node 1b9c576d-0083-4b18-ab48-79a7fd911bc2 :: false

deleteSubnodes 1.033s
2019-12-03 19:13:12 |

2019-12-03 19:13:12 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:12 | ------------------------------------

2019-12-03 19:13:12 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407"
}

2019-12-03 19:13:12 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-12-03 19:13:13 | [Mutex] waiting for: [received:nodes:0fb88c96-4df8-4c28-8579-c45a5ac2524a:localhost]

2019-12-03 19:13:13 | [Mutex] waiting for: [received:nodes:0fb88c96-4df8-4c28-8579-c45a5ac2524a:localhost]

2019-12-03 19:13:13 | [Mutex] waiting for: [received:nodes:0fb88c96-4df8-4c28-8579-c45a5ac2524a:localhost]

2019-12-03 19:13:13 | [Mutex] received everything.

2019-12-03 19:13:13 | [Mutex] isItemNotified: received:node:0fb88c96-4df8-4c28-8579-c45a5ac2524a:localhost:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407 :: false

2019-12-03 19:13:13 | [Mutex] waiting for: [received:nodes:e667fbb1-c364-4809-893b-5da5f4907bd2:localhost]

2019-12-03 19:13:13 | [Mutex] received everything.

2019-12-03 19:13:13 | [Mutex] isItemNotified: received:node:e667fbb1-c364-4809-893b-5da5f4907bd2:localhost:node-6d9b5bd8-ada4-44c1-8bed-b47a02376407:Node 6d9b5bd8-ada4-44c1-8bed-b47a02376407 :: false

publishItemsToNodes 0.041s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "entry": "<test>item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5</test>",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5"
}

2019-12-03 19:13:11 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5"
}

2019-12-03 19:13:11 | [Mutex] waiting for: [published:item:notifieditem-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:admin@localhost]

2019-12-03 19:13:11 | [Mutex] received everything.

2019-12-03 19:13:11 | [Mutex] isItemNotified: published:item:notifieditem-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:admin@localhost :: true

retractItemsFromNodes 0.111s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5"
}

2019-12-03 19:13:11 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5"
}

2019-12-03 19:13:11 | [Mutex] waiting for: [retracted:item:notifieditem-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:admin@localhost]

2019-12-03 19:13:11 | [Mutex] received everything.

2019-12-03 19:13:11 | [Mutex] isItemNotified: retracted:item:notifieditem-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:admin@localhost :: true

retrieveItemsFromNodes 0.061s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5"
}

2019-12-03 19:13:11 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "item-id": "item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5",
    "item": [
        "<item id=\"item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5\"><test>item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5</test></item>"
    ]
}

2019-12-03 19:13:11 | [Mutex] notify: [retrieved:item:item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:payload-matches:true:localhost]

2019-12-03 19:13:11 | [Mutex] received everything.

2019-12-03 19:13:11 | [Mutex] isItemNotified: retrieved:item:item-d1e0006d-7e2d-4602-9119-bcbf2f6907a5:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.054s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-12-03 19:13:11 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
        "node-1b9c576d-0083-4b18-ab48-79a7fd911bc2"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-6d9b5bd8-ada4-44c1-8bed-b47a02376407)"
}

2019-12-03 19:13:11 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.012s
2019-12-03 19:13:10 |

2019-12-03 19:13:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:10 | ------------------------------------

2019-12-03 19:13:10 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "jids": [
        "admin@localhost"
    ]
}

2019-12-03 19:13:10 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.017s
2019-12-03 19:13:11 |

2019-12-03 19:13:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-12-03 19:13:11 | ------------------------------------

2019-12-03 19:13:11 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-6d9b5bd8-ada4-44c1-8bed-b47a02376407",
    "jids": [
        "admin@localhost"
    ]
}

2019-12-03 19:13:11 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}