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

Test duration: 8.797s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.084s
2020-06-16 22:55:34 |

2020-06-16 22:55:34 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:34 | ------------------------------------

2020-06-16 22:55:34 | [Mutex] waiting for: [configured:node:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98]

2020-06-16 22:55:34 | [Mutex] received everything.

2020-06-16 22:55:34 | [Mutex] isItemNotified: configured:node:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98 :: true

2020-06-16 22:55:35 | [Mutex] waiting for: [received:nodes:5f201c74-7f88-4d04-b698-deec729731e8:localhost]

2020-06-16 22:55:35 | [Mutex] received everything.

2020-06-16 22:55:35 | [Mutex] isItemNotified: received:node:5f201c74-7f88-4d04-b698-deec729731e8:localhost:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2 :: true

2020-06-16 22:55:35 | [Mutex] waiting for: [received:nodes:5430d831-e37c-4bf2-9151-9926c68ddd02:localhost]

2020-06-16 22:55:35 | [Mutex] received everything.

2020-06-16 22:55:35 | [Mutex] isItemNotified: received:node:5430d831-e37c-4bf2-9151-9926c68ddd02:localhost:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2 :: false

createNodes 1.647s
2020-06-16 22:55:31 |

2020-06-16 22:55:31 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:31 | ------------------------------------

2020-06-16 22:55:32 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "pubsub#title": "Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2"
}

2020-06-16 22:55:32 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 22:55:33 | [Mutex] waiting for: [received:nodes:5b16c9f7-1304-4f99-8861-fbefcdc70295:localhost]

2020-06-16 22:55:33 | [Mutex] received everything.

2020-06-16 22:55:33 | [Mutex] isItemNotified: received:node:5b16c9f7-1304-4f99-8861-fbefcdc70295:localhost:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2 :: true

createSubnodes 1.017s
2020-06-16 22:55:33 |

2020-06-16 22:55:33 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:33 | ------------------------------------

2020-06-16 22:55:33 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98",
    "pubsub#title": "Node 0c5dc13f-d9fd-41f1-b26b-e2835a819d98"
}

2020-06-16 22:55:33 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 22:55:34 | [Mutex] waiting for: [received:nodes:c88039a3-6f22-4f91-a86d-6ee36b1e1e5e:localhost]

2020-06-16 22:55:34 | [Mutex] received everything.

2020-06-16 22:55:34 | [Mutex] isItemNotified: received:node:c88039a3-6f22-4f91-a86d-6ee36b1e1e5e:localhost:node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98:Node 0c5dc13f-d9fd-41f1-b26b-e2835a819d98 :: true

deleteNodes 1.023s
2020-06-16 22:55:38 |

2020-06-16 22:55:38 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:38 | ------------------------------------

2020-06-16 22:55:38 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98"
}

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

2020-06-16 22:55:39 | [Mutex] waiting for: [received:nodes:6d8ec5ad-6f85-4d3c-acc2-140b8eaa6081:localhost]

2020-06-16 22:55:39 | [Mutex] received everything.

2020-06-16 22:55:39 | [Mutex] isItemNotified: received:node:6d8ec5ad-6f85-4d3c-acc2-140b8eaa6081:localhost:node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98:Node 0c5dc13f-d9fd-41f1-b26b-e2835a819d98 :: false

deleteSubnodes 1.025s
2020-06-16 22:55:37 |

2020-06-16 22:55:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:37 | ------------------------------------

2020-06-16 22:55:37 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2"
}

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

2020-06-16 22:55:38 | [Mutex] waiting for: [received:nodes:4a0af63c-24aa-4e8c-ab40-4dee1bd662cf:localhost]

2020-06-16 22:55:38 | [Mutex] received everything.

2020-06-16 22:55:38 | [Mutex] isItemNotified: received:node:4a0af63c-24aa-4e8c-ab40-4dee1bd662cf:localhost:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2 :: false

2020-06-16 22:55:38 | [Mutex] waiting for: [received:nodes:2cee35fc-9bb4-45e6-9860-06ccd2bfb082:localhost]

2020-06-16 22:55:38 | [Mutex] received everything.

2020-06-16 22:55:38 | [Mutex] isItemNotified: received:node:2cee35fc-9bb4-45e6-9860-06ccd2bfb082:localhost:node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2:Node ab4bb5c6-fadf-41b1-8a0e-6631149be0b2 :: false

publishItemsToNodes 0.027s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

2020-06-16 22:55:36 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "entry": "<test>item-1aab4bdf-271f-404b-9ed5-1b15396bd163</test>",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163"
}

2020-06-16 22:55:36 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163"
}

2020-06-16 22:55:36 | [Mutex] waiting for: [published:item:notifieditem-1aab4bdf-271f-404b-9ed5-1b15396bd163:admin@localhost]

2020-06-16 22:55:36 | [Mutex] received everything.

2020-06-16 22:55:36 | [Mutex] isItemNotified: published:item:notifieditem-1aab4bdf-271f-404b-9ed5-1b15396bd163:admin@localhost :: true

retractItemsFromNodes 0.051s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

2020-06-16 22:55:36 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163"
}

2020-06-16 22:55:36 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163"
}

2020-06-16 22:55:36 | [Mutex] received everything.

2020-06-16 22:55:36 | [Mutex] isItemNotified: retracted:item:notifieditem-1aab4bdf-271f-404b-9ed5-1b15396bd163:admin@localhost :: true

retrieveItemsFromNodes 0.064s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

2020-06-16 22:55:36 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163"
}

2020-06-16 22:55:36 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "item-id": "item-1aab4bdf-271f-404b-9ed5-1b15396bd163",
    "item": [
        "<item id=\"item-1aab4bdf-271f-404b-9ed5-1b15396bd163\"><test>item-1aab4bdf-271f-404b-9ed5-1b15396bd163</test></item>"
    ]
}

2020-06-16 22:55:36 | [Mutex] notify: [retrieved:item:item-1aab4bdf-271f-404b-9ed5-1b15396bd163:payload-matches:true:localhost]

2020-06-16 22:55:36 | [Mutex] received everything.

2020-06-16 22:55:36 | [Mutex] isItemNotified: retrieved:item:item-1aab4bdf-271f-404b-9ed5-1b15396bd163:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.048s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

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

2020-06-16 22:55:36 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "test",
        "node-0c5dc13f-d9fd-41f1-b26b-e2835a819d98",
        "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2"
    ]
}

retrieveUserSubscriptionsWithRegex 0.052s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

2020-06-16 22:55:36 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2)"
}

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

subscribeNodes 1.020s
2020-06-16 22:55:35 |

2020-06-16 22:55:35 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:35 | ------------------------------------

2020-06-16 22:55:35 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-16 22:55:35 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.072s
2020-06-16 22:55:36 |

2020-06-16 22:55:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 22:55:36 | ------------------------------------

2020-06-16 22:55:36 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-ab4bb5c6-fadf-41b1-8a0e-6631149be0b2",
    "jids": [
        "admin@localhost"
    ]
}

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