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

Test duration: 8.944s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.110s
2019-11-27 19:19:00 |

2019-11-27 19:19:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:00 | ------------------------------------

2019-11-27 19:19:00 | [Mutex] waiting for: [configured:node:node-1bc2e397-884d-437c-b75c-09fb185a8f47:node-3188b486-1ae6-4675-843c-b328a0699666]

2019-11-27 19:19:00 | [Mutex] received everything.

2019-11-27 19:19:00 | [Mutex] isItemNotified: configured:node:node-1bc2e397-884d-437c-b75c-09fb185a8f47:node-3188b486-1ae6-4675-843c-b328a0699666 :: true

2019-11-27 19:19:01 | [Mutex] waiting for: [received:nodes:c3d6928d-b0f9-410d-abfd-5371f0abed24:localhost]

2019-11-27 19:19:01 | [Mutex] received everything.

2019-11-27 19:19:01 | [Mutex] isItemNotified: received:node:c3d6928d-b0f9-410d-abfd-5371f0abed24:localhost:node-1bc2e397-884d-437c-b75c-09fb185a8f47:Node 1bc2e397-884d-437c-b75c-09fb185a8f47 :: true

2019-11-27 19:19:01 | [Mutex] waiting for: [received:nodes:2ddd40ef-ae51-426b-ac36-17867e0ec497:localhost]

2019-11-27 19:19:01 | [Mutex] received everything.

2019-11-27 19:19:01 | [Mutex] isItemNotified: received:node:2ddd40ef-ae51-426b-ac36-17867e0ec497:localhost:node-1bc2e397-884d-437c-b75c-09fb185a8f47:Node 1bc2e397-884d-437c-b75c-09fb185a8f47 :: false

createNodes 1.731s
2019-11-27 19:18:58 |

2019-11-27 19:18:58 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:18:58 | ------------------------------------

2019-11-27 19:18:58 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "pubsub#title": "Node 1bc2e397-884d-437c-b75c-09fb185a8f47"
}

2019-11-27 19:18:58 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-27 19:18:59 | [Mutex] waiting for: [received:nodes:5c851aa0-85bc-48ba-a771-b05c2398f874:localhost]

2019-11-27 19:18:59 | [Mutex] received everything.

2019-11-27 19:18:59 | [Mutex] isItemNotified: received:node:5c851aa0-85bc-48ba-a771-b05c2398f874:localhost:node-1bc2e397-884d-437c-b75c-09fb185a8f47:Node 1bc2e397-884d-437c-b75c-09fb185a8f47 :: true

createSubnodes 1.053s
2019-11-27 19:18:59 |

2019-11-27 19:18:59 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:18:59 | ------------------------------------

2019-11-27 19:18:59 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-3188b486-1ae6-4675-843c-b328a0699666",
    "pubsub#title": "Node 3188b486-1ae6-4675-843c-b328a0699666"
}

2019-11-27 19:18:59 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-27 19:19:00 | [Mutex] waiting for: [received:nodes:f3b841b4-5aa5-48d3-9b68-72b83254d771:localhost]

2019-11-27 19:19:00 | [Mutex] received everything.

2019-11-27 19:19:00 | [Mutex] isItemNotified: received:node:f3b841b4-5aa5-48d3-9b68-72b83254d771:localhost:node-3188b486-1ae6-4675-843c-b328a0699666:Node 3188b486-1ae6-4675-843c-b328a0699666 :: true

deleteNodes 1.018s
2019-11-27 19:19:05 |

2019-11-27 19:19:05 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:05 | ------------------------------------

2019-11-27 19:19:05 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-3188b486-1ae6-4675-843c-b328a0699666"
}

2019-11-27 19:19:05 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-27 19:19:06 | [Mutex] waiting for: [received:nodes:fc6f1560-ed84-4d8e-862b-7f54d4fc26e3:localhost]

2019-11-27 19:19:06 | [Mutex] received everything.

2019-11-27 19:19:06 | [Mutex] isItemNotified: received:node:fc6f1560-ed84-4d8e-862b-7f54d4fc26e3:localhost:node-3188b486-1ae6-4675-843c-b328a0699666:Node 3188b486-1ae6-4675-843c-b328a0699666 :: false

deleteSubnodes 1.027s
2019-11-27 19:19:04 |

2019-11-27 19:19:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:04 | ------------------------------------

2019-11-27 19:19:04 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47"
}

2019-11-27 19:19:04 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-27 19:19:05 | [Mutex] waiting for: [received:nodes:db65e649-7979-4e35-aa05-95d895f9a3f1:localhost]

2019-11-27 19:19:05 | [Mutex] waiting for: [received:nodes:db65e649-7979-4e35-aa05-95d895f9a3f1:localhost]

2019-11-27 19:19:05 | [Mutex] waiting for: [received:nodes:db65e649-7979-4e35-aa05-95d895f9a3f1:localhost]

2019-11-27 19:19:05 | [Mutex] received everything.

2019-11-27 19:19:05 | [Mutex] isItemNotified: received:node:db65e649-7979-4e35-aa05-95d895f9a3f1:localhost:node-1bc2e397-884d-437c-b75c-09fb185a8f47:Node 1bc2e397-884d-437c-b75c-09fb185a8f47 :: false

2019-11-27 19:19:05 | [Mutex] waiting for: [received:nodes:56d81936-fc6a-4e05-b849-a4de3b29a99a:localhost]

2019-11-27 19:19:05 | [Mutex] received everything.

2019-11-27 19:19:05 | [Mutex] isItemNotified: received:node:56d81936-fc6a-4e05-b849-a4de3b29a99a:localhost:node-1bc2e397-884d-437c-b75c-09fb185a8f47:Node 1bc2e397-884d-437c-b75c-09fb185a8f47 :: false

publishItemsToNodes 0.041s
2019-11-27 19:19:02 |

2019-11-27 19:19:02 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:02 | ------------------------------------

2019-11-27 19:19:02 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "entry": "<test>item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2</test>",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2"
}

2019-11-27 19:19:02 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2"
}

2019-11-27 19:19:02 | [Mutex] waiting for: [published:item:notifieditem-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:admin@localhost]

2019-11-27 19:19:02 | [Mutex] received everything.

2019-11-27 19:19:02 | [Mutex] isItemNotified: published:item:notifieditem-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:admin@localhost :: true

retractItemsFromNodes 0.059s
2019-11-27 19:19:03 |

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

2019-11-27 19:19:03 | ------------------------------------

2019-11-27 19:19:03 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2"
}

2019-11-27 19:19:03 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2"
}

2019-11-27 19:19:03 | [Mutex] waiting for: [retracted:item:notifieditem-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:admin@localhost]

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

2019-11-27 19:19:03 | [Mutex] isItemNotified: retracted:item:notifieditem-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:admin@localhost :: true

retrieveItemsFromNodes 0.063s
2019-11-27 19:19:02 |

2019-11-27 19:19:02 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:02 | ------------------------------------

2019-11-27 19:19:02 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2"
}

2019-11-27 19:19:03 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "item-id": "item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2",
    "item": [
        "<item id=\"item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2\"><test>item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2</test></item>"
    ]
}

2019-11-27 19:19:03 | [Mutex] notify: [retrieved:item:item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:payload-matches:true:localhost]

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

2019-11-27 19:19:03 | [Mutex] isItemNotified: retrieved:item:item-9fd120b3-17d5-4c1f-b8ac-ddf83ca54df2:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-27 19:19:03 |

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

2019-11-27 19:19:03 | ------------------------------------

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

2019-11-27 19:19:03 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-3188b486-1ae6-4675-843c-b328a0699666",
        "node-1bc2e397-884d-437c-b75c-09fb185a8f47"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-27 19:19:03 |

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

2019-11-27 19:19:03 | ------------------------------------

2019-11-27 19:19:03 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-1bc2e397-884d-437c-b75c-09fb185a8f47)"
}

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

subscribeNodes 1.011s
2019-11-27 19:19:01 |

2019-11-27 19:19:01 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-27 19:19:01 | ------------------------------------

2019-11-27 19:19:01 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-27 19:19:01 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.064s
2019-11-27 19:19:03 |

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

2019-11-27 19:19:03 | ------------------------------------

2019-11-27 19:19:03 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-1bc2e397-884d-437c-b75c-09fb185a8f47",
    "jids": [
        "admin@localhost"
    ]
}

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