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

Test duration: 9.034s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.107s
2019-11-24 19:42:53 |

2019-11-24 19:42:53 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:53 | ------------------------------------

2019-11-24 19:42:53 | [Mutex] waiting for: [configured:node:node-01695277-8e1b-4262-ae96-2762bd6fa61e:node-07e003cd-4d28-4fdf-8042-42d4a14f2c40]

2019-11-24 19:42:53 | [Mutex] received everything.

2019-11-24 19:42:53 | [Mutex] isItemNotified: configured:node:node-01695277-8e1b-4262-ae96-2762bd6fa61e:node-07e003cd-4d28-4fdf-8042-42d4a14f2c40 :: true

2019-11-24 19:42:54 | [Mutex] waiting for: [received:nodes:7b36a734-ee6a-4ea0-86ea-c41202913484:localhost]

2019-11-24 19:42:54 | [Mutex] received everything.

2019-11-24 19:42:54 | [Mutex] isItemNotified: received:node:7b36a734-ee6a-4ea0-86ea-c41202913484:localhost:node-01695277-8e1b-4262-ae96-2762bd6fa61e:Node 01695277-8e1b-4262-ae96-2762bd6fa61e :: true

2019-11-24 19:42:54 | [Mutex] waiting for: [received:nodes:741c828f-974c-40bc-91b7-8217013ae512:localhost]

2019-11-24 19:42:54 | [Mutex] received everything.

2019-11-24 19:42:54 | [Mutex] isItemNotified: received:node:741c828f-974c-40bc-91b7-8217013ae512:localhost:node-01695277-8e1b-4262-ae96-2762bd6fa61e:Node 01695277-8e1b-4262-ae96-2762bd6fa61e :: false

createNodes 1.777s
2019-11-24 19:42:50 |

2019-11-24 19:42:50 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:50 | ------------------------------------

2019-11-24 19:42:51 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "pubsub#title": "Node 01695277-8e1b-4262-ae96-2762bd6fa61e"
}

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

2019-11-24 19:42:52 | [Mutex] waiting for: [received:nodes:9a5fa8e8-2ffc-4c6e-b283-9c393117505f:localhost]

2019-11-24 19:42:52 | [Mutex] received everything.

2019-11-24 19:42:52 | [Mutex] isItemNotified: received:node:9a5fa8e8-2ffc-4c6e-b283-9c393117505f:localhost:node-01695277-8e1b-4262-ae96-2762bd6fa61e:Node 01695277-8e1b-4262-ae96-2762bd6fa61e :: true

createSubnodes 1.029s
2019-11-24 19:42:52 |

2019-11-24 19:42:52 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:52 | ------------------------------------

2019-11-24 19:42:52 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-07e003cd-4d28-4fdf-8042-42d4a14f2c40",
    "pubsub#title": "Node 07e003cd-4d28-4fdf-8042-42d4a14f2c40"
}

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

2019-11-24 19:42:53 | [Mutex] waiting for: [received:nodes:6410ec6e-bdbd-496e-8630-2580ad643561:localhost]

2019-11-24 19:42:53 | [Mutex] received everything.

2019-11-24 19:42:53 | [Mutex] isItemNotified: received:node:6410ec6e-bdbd-496e-8630-2580ad643561:localhost:node-07e003cd-4d28-4fdf-8042-42d4a14f2c40:Node 07e003cd-4d28-4fdf-8042-42d4a14f2c40 :: true

deleteNodes 1.024s
2019-11-24 19:42:58 |

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

2019-11-24 19:42:58 | ------------------------------------

2019-11-24 19:42:58 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-07e003cd-4d28-4fdf-8042-42d4a14f2c40"
}

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

2019-11-24 19:42:59 | [Mutex] waiting for: [received:nodes:badcf5b6-6f66-4ef5-ba25-79a90c5f39be:localhost]

2019-11-24 19:42:59 | [Mutex] received everything.

2019-11-24 19:42:59 | [Mutex] isItemNotified: received:node:badcf5b6-6f66-4ef5-ba25-79a90c5f39be:localhost:node-07e003cd-4d28-4fdf-8042-42d4a14f2c40:Node 07e003cd-4d28-4fdf-8042-42d4a14f2c40 :: false

deleteSubnodes 1.027s
2019-11-24 19:42:57 |

2019-11-24 19:42:57 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:57 | ------------------------------------

2019-11-24 19:42:57 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e"
}

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

2019-11-24 19:42:58 | [Mutex] waiting for: [received:nodes:a783a7aa-14ed-4207-a0e8-40a645f4ef01:localhost]

2019-11-24 19:42:58 | [Mutex] received everything.

2019-11-24 19:42:58 | [Mutex] isItemNotified: received:node:a783a7aa-14ed-4207-a0e8-40a645f4ef01:localhost:node-01695277-8e1b-4262-ae96-2762bd6fa61e:Node 01695277-8e1b-4262-ae96-2762bd6fa61e :: false

2019-11-24 19:42:58 | [Mutex] waiting for: [received:nodes:984e2e79-7c10-4f80-a38d-d49f59d520bb:localhost]

2019-11-24 19:42:58 | [Mutex] received everything.

2019-11-24 19:42:58 | [Mutex] isItemNotified: received:node:984e2e79-7c10-4f80-a38d-d49f59d520bb:localhost:node-01695277-8e1b-4262-ae96-2762bd6fa61e:Node 01695277-8e1b-4262-ae96-2762bd6fa61e :: false

publishItemsToNodes 0.051s
2019-11-24 19:42:55 |

2019-11-24 19:42:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:55 | ------------------------------------

2019-11-24 19:42:55 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "entry": "<test>item-40310068-40d1-47f0-8ec6-dca54f3fc781</test>",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781"
}

2019-11-24 19:42:55 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781"
}

2019-11-24 19:42:55 | [Mutex] waiting for: [published:item:notifieditem-40310068-40d1-47f0-8ec6-dca54f3fc781:admin@localhost]

2019-11-24 19:42:55 | [Mutex] received everything.

2019-11-24 19:42:55 | [Mutex] isItemNotified: published:item:notifieditem-40310068-40d1-47f0-8ec6-dca54f3fc781:admin@localhost :: true

retractItemsFromNodes 0.055s
2019-11-24 19:42:56 |

2019-11-24 19:42:56 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:56 | ------------------------------------

2019-11-24 19:42:56 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781"
}

2019-11-24 19:42:56 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781"
}

2019-11-24 19:42:56 | [Mutex] received everything.

2019-11-24 19:42:56 | [Mutex] isItemNotified: retracted:item:notifieditem-40310068-40d1-47f0-8ec6-dca54f3fc781:admin@localhost :: true

retrieveItemsFromNodes 0.055s
2019-11-24 19:42:55 |

2019-11-24 19:42:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:55 | ------------------------------------

2019-11-24 19:42:55 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781"
}

2019-11-24 19:42:55 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "item-id": "item-40310068-40d1-47f0-8ec6-dca54f3fc781",
    "item": [
        "<item id=\"item-40310068-40d1-47f0-8ec6-dca54f3fc781\"><test>item-40310068-40d1-47f0-8ec6-dca54f3fc781</test></item>"
    ]
}

2019-11-24 19:42:55 | [Mutex] notify: [retrieved:item:item-40310068-40d1-47f0-8ec6-dca54f3fc781:payload-matches:true:localhost]

2019-11-24 19:42:55 | [Mutex] received everything.

2019-11-24 19:42:55 | [Mutex] isItemNotified: retrieved:item:item-40310068-40d1-47f0-8ec6-dca54f3fc781:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-24 19:42:55 |

2019-11-24 19:42:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:55 | ------------------------------------

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

2019-11-24 19:42:55 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-07e003cd-4d28-4fdf-8042-42d4a14f2c40",
        "node-01695277-8e1b-4262-ae96-2762bd6fa61e"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-11-24 19:42:55 |

2019-11-24 19:42:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:55 | ------------------------------------

2019-11-24 19:42:55 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-01695277-8e1b-4262-ae96-2762bd6fa61e)"
}

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

subscribeNodes 1.016s
2019-11-24 19:42:54 |

2019-11-24 19:42:54 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:54 | ------------------------------------

2019-11-24 19:42:54 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.079s
2019-11-24 19:42:56 |

2019-11-24 19:42:56 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-24 19:42:56 | ------------------------------------

2019-11-24 19:42:56 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-01695277-8e1b-4262-ae96-2762bd6fa61e",
    "jids": [
        "admin@localhost"
    ]
}

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