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

Test duration: 8.988s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.113s
2019-11-22 18:43:58 |

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

2019-11-22 18:43:58 | ------------------------------------

2019-11-22 18:43:58 | [Mutex] waiting for: [configured:node:node-ae9187e0-8bfa-4859-a060-66212c4ca458:node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e]

2019-11-22 18:43:58 | [Mutex] received everything.

2019-11-22 18:43:58 | [Mutex] isItemNotified: configured:node:node-ae9187e0-8bfa-4859-a060-66212c4ca458:node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e :: true

2019-11-22 18:43:59 | [Mutex] waiting for: [received:nodes:9e166969-60e8-4eda-a3c5-9efa89245810:localhost]

2019-11-22 18:43:59 | [Mutex] received everything.

2019-11-22 18:43:59 | [Mutex] isItemNotified: received:node:9e166969-60e8-4eda-a3c5-9efa89245810:localhost:node-ae9187e0-8bfa-4859-a060-66212c4ca458:Node ae9187e0-8bfa-4859-a060-66212c4ca458 :: true

2019-11-22 18:43:59 | [Mutex] waiting for: [received:nodes:b318b2df-156a-43f8-a5e0-665152f2bbb4:localhost]

2019-11-22 18:43:59 | [Mutex] received everything.

2019-11-22 18:43:59 | [Mutex] isItemNotified: received:node:b318b2df-156a-43f8-a5e0-665152f2bbb4:localhost:node-ae9187e0-8bfa-4859-a060-66212c4ca458:Node ae9187e0-8bfa-4859-a060-66212c4ca458 :: false

createNodes 1.730s
2019-11-22 18:43:55 |

2019-11-22 18:43:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:43:55 | ------------------------------------

2019-11-22 18:43:56 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "pubsub#title": "Node ae9187e0-8bfa-4859-a060-66212c4ca458"
}

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

2019-11-22 18:43:57 | [Mutex] waiting for: [received:nodes:f1fcf8aa-82c3-46c9-9b2f-92786145b916:localhost]

2019-11-22 18:43:57 | [Mutex] received everything.

2019-11-22 18:43:57 | [Mutex] isItemNotified: received:node:f1fcf8aa-82c3-46c9-9b2f-92786145b916:localhost:node-ae9187e0-8bfa-4859-a060-66212c4ca458:Node ae9187e0-8bfa-4859-a060-66212c4ca458 :: true

createSubnodes 1.021s
2019-11-22 18:43:57 |

2019-11-22 18:43:57 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:43:57 | ------------------------------------

2019-11-22 18:43:57 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e",
    "pubsub#title": "Node 48a8d9c3-b49f-417a-8d36-dd01142d2c3e"
}

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

2019-11-22 18:43:58 | [Mutex] waiting for: [received:nodes:d34230b6-3775-4d17-97fc-fb6e362d84fb:localhost]

2019-11-22 18:43:58 | [Mutex] received everything.

2019-11-22 18:43:58 | [Mutex] isItemNotified: received:node:d34230b6-3775-4d17-97fc-fb6e362d84fb:localhost:node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e:Node 48a8d9c3-b49f-417a-8d36-dd01142d2c3e :: true

deleteNodes 1.021s
2019-11-22 18:44:02 |

2019-11-22 18:44:02 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:02 | ------------------------------------

2019-11-22 18:44:02 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e"
}

2019-11-22 18:44:02 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-22 18:44:03 | [Mutex] waiting for: [received:nodes:1e5f9a15-0607-45f9-97e4-94e5906895e8:localhost]

2019-11-22 18:44:03 | [Mutex] waiting for: [received:nodes:1e5f9a15-0607-45f9-97e4-94e5906895e8:localhost]

2019-11-22 18:44:03 | [Mutex] received everything.

2019-11-22 18:44:03 | [Mutex] isItemNotified: received:node:1e5f9a15-0607-45f9-97e4-94e5906895e8:localhost:node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e:Node 48a8d9c3-b49f-417a-8d36-dd01142d2c3e :: false

deleteSubnodes 1.034s
2019-11-22 18:44:01 |

2019-11-22 18:44:01 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:01 | ------------------------------------

2019-11-22 18:44:01 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458"
}

2019-11-22 18:44:01 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-11-22 18:44:02 | [Mutex] waiting for: [received:nodes:adc97ed2-af96-4ffa-a9a4-dc7aefb6c153:localhost]

2019-11-22 18:44:02 | [Mutex] received everything.

2019-11-22 18:44:02 | [Mutex] isItemNotified: received:node:adc97ed2-af96-4ffa-a9a4-dc7aefb6c153:localhost:node-ae9187e0-8bfa-4859-a060-66212c4ca458:Node ae9187e0-8bfa-4859-a060-66212c4ca458 :: false

2019-11-22 18:44:02 | [Mutex] waiting for: [received:nodes:98ab5aa3-0f2b-46c6-881f-9ae36850fd46:localhost]

2019-11-22 18:44:02 | [Mutex] received everything.

2019-11-22 18:44:02 | [Mutex] isItemNotified: received:node:98ab5aa3-0f2b-46c6-881f-9ae36850fd46:localhost:node-ae9187e0-8bfa-4859-a060-66212c4ca458:Node ae9187e0-8bfa-4859-a060-66212c4ca458 :: false

publishItemsToNodes 0.023s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "entry": "<test>item-3b2414a3-5821-4a50-ae97-abb55c366a2d</test>",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d"
}

2019-11-22 18:44:00 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d"
}

2019-11-22 18:44:00 | [Mutex] waiting for: [published:item:notifieditem-3b2414a3-5821-4a50-ae97-abb55c366a2d:admin@localhost]

2019-11-22 18:44:00 | [Mutex] received everything.

2019-11-22 18:44:00 | [Mutex] isItemNotified: published:item:notifieditem-3b2414a3-5821-4a50-ae97-abb55c366a2d:admin@localhost :: true

retractItemsFromNodes 0.056s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d"
}

2019-11-22 18:44:00 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d"
}

2019-11-22 18:44:00 | [Mutex] received everything.

2019-11-22 18:44:00 | [Mutex] isItemNotified: retracted:item:notifieditem-3b2414a3-5821-4a50-ae97-abb55c366a2d:admin@localhost :: true

retrieveItemsFromNodes 0.066s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d"
}

2019-11-22 18:44:00 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "item-id": "item-3b2414a3-5821-4a50-ae97-abb55c366a2d",
    "item": [
        "<item id=\"item-3b2414a3-5821-4a50-ae97-abb55c366a2d\"><test>item-3b2414a3-5821-4a50-ae97-abb55c366a2d</test></item>"
    ]
}

2019-11-22 18:44:00 | [Mutex] notify: [retrieved:item:item-3b2414a3-5821-4a50-ae97-abb55c366a2d:payload-matches:true:localhost]

2019-11-22 18:44:00 | [Mutex] received everything.

2019-11-22 18:44:00 | [Mutex] isItemNotified: retrieved:item:item-3b2414a3-5821-4a50-ae97-abb55c366a2d:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-11-22 18:44:00 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-48a8d9c3-b49f-417a-8d36-dd01142d2c3e",
        "node-ae9187e0-8bfa-4859-a060-66212c4ca458"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-ae9187e0-8bfa-4859-a060-66212c4ca458)"
}

2019-11-22 18:44:00 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.011s
2019-11-22 18:43:59 |

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

2019-11-22 18:43:59 | ------------------------------------

2019-11-22 18:43:59 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.070s
2019-11-22 18:44:00 |

2019-11-22 18:44:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-22 18:44:00 | ------------------------------------

2019-11-22 18:44:00 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-ae9187e0-8bfa-4859-a060-66212c4ca458",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-22 18:44:00 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}