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

Test duration: 9.071s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.124s
2019-11-24 18:43:25 |

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

2019-11-24 18:43:25 | ------------------------------------

2019-11-24 18:43:25 | [Mutex] waiting for: [configured:node:node-03c0c5ac-deb2-422f-9181-a90d62b73358:node-4d0c325c-e340-466e-8ea3-f54185a0ce05]

2019-11-24 18:43:25 | [Mutex] received everything.

2019-11-24 18:43:25 | [Mutex] isItemNotified: configured:node:node-03c0c5ac-deb2-422f-9181-a90d62b73358:node-4d0c325c-e340-466e-8ea3-f54185a0ce05 :: true

2019-11-24 18:43:26 | [Mutex] waiting for: [received:nodes:4d6dec46-d20f-4d2e-a995-a1c9d84fe932:localhost]

2019-11-24 18:43:26 | [Mutex] received everything.

2019-11-24 18:43:26 | [Mutex] isItemNotified: received:node:4d6dec46-d20f-4d2e-a995-a1c9d84fe932:localhost:node-03c0c5ac-deb2-422f-9181-a90d62b73358:Node 03c0c5ac-deb2-422f-9181-a90d62b73358 :: true

2019-11-24 18:43:26 | [Mutex] waiting for: [received:nodes:bc39e382-e532-4201-89dc-ffeeba953f14:localhost]

2019-11-24 18:43:26 | [Mutex] received everything.

2019-11-24 18:43:26 | [Mutex] isItemNotified: received:node:bc39e382-e532-4201-89dc-ffeeba953f14:localhost:node-03c0c5ac-deb2-422f-9181-a90d62b73358:Node 03c0c5ac-deb2-422f-9181-a90d62b73358 :: false

createNodes 1.741s
2019-11-24 18:43:22 |

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

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

2019-11-24 18:43:23 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "pubsub#title": "Node 03c0c5ac-deb2-422f-9181-a90d62b73358"
}

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

2019-11-24 18:43:24 | [Mutex] waiting for: [received:nodes:4c16b610-2d32-4eee-b415-5cb2f0a87aa1:localhost]

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

2019-11-24 18:43:24 | [Mutex] isItemNotified: received:node:4c16b610-2d32-4eee-b415-5cb2f0a87aa1:localhost:node-03c0c5ac-deb2-422f-9181-a90d62b73358:Node 03c0c5ac-deb2-422f-9181-a90d62b73358 :: true

createSubnodes 1.029s
2019-11-24 18:43:24 |

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

2019-11-24 18:43:24 | ------------------------------------

2019-11-24 18:43:24 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-4d0c325c-e340-466e-8ea3-f54185a0ce05",
    "pubsub#title": "Node 4d0c325c-e340-466e-8ea3-f54185a0ce05"
}

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

2019-11-24 18:43:25 | [Mutex] waiting for: [received:nodes:37384925-07e6-42be-b079-ad02ce253a0d:localhost]

2019-11-24 18:43:25 | [Mutex] received everything.

2019-11-24 18:43:25 | [Mutex] isItemNotified: received:node:37384925-07e6-42be-b079-ad02ce253a0d:localhost:node-4d0c325c-e340-466e-8ea3-f54185a0ce05:Node 4d0c325c-e340-466e-8ea3-f54185a0ce05 :: true

deleteNodes 1.021s
2019-11-24 18:43:30 |

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

2019-11-24 18:43:30 | ------------------------------------

2019-11-24 18:43:30 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-4d0c325c-e340-466e-8ea3-f54185a0ce05"
}

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

2019-11-24 18:43:31 | [Mutex] waiting for: [received:nodes:6df21009-df85-43d1-8def-e7d2934e128a:localhost]

2019-11-24 18:43:31 | [Mutex] received everything.

2019-11-24 18:43:31 | [Mutex] isItemNotified: received:node:6df21009-df85-43d1-8def-e7d2934e128a:localhost:node-4d0c325c-e340-466e-8ea3-f54185a0ce05:Node 4d0c325c-e340-466e-8ea3-f54185a0ce05 :: false

deleteSubnodes 1.034s
2019-11-24 18:43:28 |

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

2019-11-24 18:43:28 | ------------------------------------

2019-11-24 18:43:28 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358"
}

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

2019-11-24 18:43:30 | [Mutex] waiting for: [received:nodes:ca4348d0-ba5d-480b-8794-23e08daf08ff:localhost]

2019-11-24 18:43:30 | [Mutex] waiting for: [received:nodes:ca4348d0-ba5d-480b-8794-23e08daf08ff:localhost]

2019-11-24 18:43:30 | [Mutex] received everything.

2019-11-24 18:43:30 | [Mutex] isItemNotified: received:node:ca4348d0-ba5d-480b-8794-23e08daf08ff:localhost:node-03c0c5ac-deb2-422f-9181-a90d62b73358:Node 03c0c5ac-deb2-422f-9181-a90d62b73358 :: false

2019-11-24 18:43:30 | [Mutex] waiting for: [received:nodes:050b59f0-71a4-4f96-a9c2-acf59d8eca04:localhost]

2019-11-24 18:43:30 | [Mutex] received everything.

2019-11-24 18:43:30 | [Mutex] isItemNotified: received:node:050b59f0-71a4-4f96-a9c2-acf59d8eca04:localhost:node-03c0c5ac-deb2-422f-9181-a90d62b73358:Node 03c0c5ac-deb2-422f-9181-a90d62b73358 :: false

publishItemsToNodes 0.059s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

2019-11-24 18:43:27 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "entry": "<test>item-e82b897d-1089-4df3-ba3a-881c64e528c3</test>",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3"
}

2019-11-24 18:43:27 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3"
}

2019-11-24 18:43:27 | [Mutex] waiting for: [published:item:notifieditem-e82b897d-1089-4df3-ba3a-881c64e528c3:admin@localhost]

2019-11-24 18:43:27 | [Mutex] received everything.

2019-11-24 18:43:27 | [Mutex] isItemNotified: published:item:notifieditem-e82b897d-1089-4df3-ba3a-881c64e528c3:admin@localhost :: true

retractItemsFromNodes 0.063s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

2019-11-24 18:43:27 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3"
}

2019-11-24 18:43:27 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3"
}

2019-11-24 18:43:27 | [Mutex] received everything.

2019-11-24 18:43:27 | [Mutex] isItemNotified: retracted:item:notifieditem-e82b897d-1089-4df3-ba3a-881c64e528c3:admin@localhost :: true

retrieveItemsFromNodes 0.063s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

2019-11-24 18:43:27 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3"
}

2019-11-24 18:43:27 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "item-id": "item-e82b897d-1089-4df3-ba3a-881c64e528c3",
    "item": [
        "<item id=\"item-e82b897d-1089-4df3-ba3a-881c64e528c3\"><test>item-e82b897d-1089-4df3-ba3a-881c64e528c3</test></item>"
    ]
}

2019-11-24 18:43:27 | [Mutex] notify: [retrieved:item:item-e82b897d-1089-4df3-ba3a-881c64e528c3:payload-matches:true:localhost]

2019-11-24 18:43:27 | [Mutex] received everything.

2019-11-24 18:43:27 | [Mutex] isItemNotified: retrieved:item:item-e82b897d-1089-4df3-ba3a-881c64e528c3:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

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

2019-11-24 18:43:27 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-4d0c325c-e340-466e-8ea3-f54185a0ce05",
        "node-03c0c5ac-deb2-422f-9181-a90d62b73358"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

2019-11-24 18:43:27 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-03c0c5ac-deb2-422f-9181-a90d62b73358)"
}

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

subscribeNodes 1.017s
2019-11-24 18:43:26 |

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

2019-11-24 18:43:26 | ------------------------------------

2019-11-24 18:43:26 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.059s
2019-11-24 18:43:27 |

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

2019-11-24 18:43:27 | ------------------------------------

2019-11-24 18:43:27 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-03c0c5ac-deb2-422f-9181-a90d62b73358",
    "jids": [
        "admin@localhost"
    ]
}

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