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

Test duration: 9.201s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.127s
2019-10-13 20:14:35 |

2019-10-13 20:14:35 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:35 | ------------------------------------

2019-10-13 20:14:35 | [Mutex] waiting for: [configured:node:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:node-d1249c0a-a076-4c97-999e-5471514ca80d]

2019-10-13 20:14:35 | [Mutex] received everything.

2019-10-13 20:14:35 | [Mutex] isItemNotified: configured:node:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:node-d1249c0a-a076-4c97-999e-5471514ca80d :: true

2019-10-13 20:14:36 | [Mutex] waiting for: [received:nodes:89e826f5-b941-4bdf-9df1-169fe4b00f60:localhost]

2019-10-13 20:14:36 | [Mutex] received everything.

2019-10-13 20:14:36 | [Mutex] isItemNotified: received:node:89e826f5-b941-4bdf-9df1-169fe4b00f60:localhost:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:Node cc384fee-a43c-4ee1-96ab-fab0ea94e525 :: true

2019-10-13 20:14:36 | [Mutex] waiting for: [received:nodes:9e13719e-1252-49b1-9210-20992d36596b:localhost]

2019-10-13 20:14:36 | [Mutex] waiting for: [received:nodes:9e13719e-1252-49b1-9210-20992d36596b:localhost]

2019-10-13 20:14:36 | [Mutex] received everything.

2019-10-13 20:14:36 | [Mutex] isItemNotified: received:node:9e13719e-1252-49b1-9210-20992d36596b:localhost:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:Node cc384fee-a43c-4ee1-96ab-fab0ea94e525 :: false

createNodes 1.773s
2019-10-13 20:14:32 |

2019-10-13 20:14:32 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:32 | ------------------------------------

2019-10-13 20:14:33 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "pubsub#title": "Node cc384fee-a43c-4ee1-96ab-fab0ea94e525"
}

2019-10-13 20:14:33 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 20:14:34 | [Mutex] waiting for: [received:nodes:118095c6-9166-442d-b304-42451d432c75:localhost]

2019-10-13 20:14:34 | [Mutex] waiting for: [received:nodes:118095c6-9166-442d-b304-42451d432c75:localhost]

2019-10-13 20:14:34 | [Mutex] received everything.

2019-10-13 20:14:34 | [Mutex] isItemNotified: received:node:118095c6-9166-442d-b304-42451d432c75:localhost:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:Node cc384fee-a43c-4ee1-96ab-fab0ea94e525 :: true

createSubnodes 1.030s
2019-10-13 20:14:34 |

2019-10-13 20:14:34 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:34 | ------------------------------------

2019-10-13 20:14:34 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-d1249c0a-a076-4c97-999e-5471514ca80d",
    "pubsub#title": "Node d1249c0a-a076-4c97-999e-5471514ca80d"
}

2019-10-13 20:14:34 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 20:14:35 | [Mutex] waiting for: [received:nodes:c8274041-d89d-476b-997d-65c3b84bb0bd:localhost]

2019-10-13 20:14:35 | [Mutex] received everything.

2019-10-13 20:14:35 | [Mutex] isItemNotified: received:node:c8274041-d89d-476b-997d-65c3b84bb0bd:localhost:node-d1249c0a-a076-4c97-999e-5471514ca80d:Node d1249c0a-a076-4c97-999e-5471514ca80d :: true

deleteNodes 1.019s
2019-10-13 20:14:39 |

2019-10-13 20:14:39 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:39 | ------------------------------------

2019-10-13 20:14:39 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-d1249c0a-a076-4c97-999e-5471514ca80d"
}

2019-10-13 20:14:39 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 20:14:40 | [Mutex] waiting for: [received:nodes:8bd4dfa0-461e-4e1c-89fa-e5bf40afa68b:localhost]

2019-10-13 20:14:40 | [Mutex] waiting for: [received:nodes:8bd4dfa0-461e-4e1c-89fa-e5bf40afa68b:localhost]

2019-10-13 20:14:40 | [Mutex] received everything.

2019-10-13 20:14:40 | [Mutex] isItemNotified: received:node:8bd4dfa0-461e-4e1c-89fa-e5bf40afa68b:localhost:node-d1249c0a-a076-4c97-999e-5471514ca80d:Node d1249c0a-a076-4c97-999e-5471514ca80d :: false

deleteSubnodes 1.025s
2019-10-13 20:14:38 |

2019-10-13 20:14:38 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:38 | ------------------------------------

2019-10-13 20:14:38 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525"
}

2019-10-13 20:14:38 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 20:14:39 | [Mutex] waiting for: [received:nodes:2be266d9-6729-4c42-ac57-2b0dab31ed29:localhost]

2019-10-13 20:14:39 | [Mutex] waiting for: [received:nodes:2be266d9-6729-4c42-ac57-2b0dab31ed29:localhost]

2019-10-13 20:14:39 | [Mutex] received everything.

2019-10-13 20:14:39 | [Mutex] isItemNotified: received:node:2be266d9-6729-4c42-ac57-2b0dab31ed29:localhost:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:Node cc384fee-a43c-4ee1-96ab-fab0ea94e525 :: false

2019-10-13 20:14:39 | [Mutex] waiting for: [received:nodes:e6b0c386-76d4-4bb9-a5ae-3dbae6019097:localhost]

2019-10-13 20:14:39 | [Mutex] received everything.

2019-10-13 20:14:39 | [Mutex] isItemNotified: received:node:e6b0c386-76d4-4bb9-a5ae-3dbae6019097:localhost:node-cc384fee-a43c-4ee1-96ab-fab0ea94e525:Node cc384fee-a43c-4ee1-96ab-fab0ea94e525 :: false

publishItemsToNodes 0.054s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "entry": "<test>item-b412470b-0f8c-434e-9e5d-d5058471698a</test>",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a"
}

2019-10-13 20:14:37 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a"
}

2019-10-13 20:14:37 | [Mutex] waiting for: [published:item:notifieditem-b412470b-0f8c-434e-9e5d-d5058471698a:admin@localhost]

2019-10-13 20:14:37 | [Mutex] received everything.

2019-10-13 20:14:37 | [Mutex] isItemNotified: published:item:notifieditem-b412470b-0f8c-434e-9e5d-d5058471698a:admin@localhost :: true

retractItemsFromNodes 0.056s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a"
}

2019-10-13 20:14:37 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a"
}

2019-10-13 20:14:37 | [Mutex] received everything.

2019-10-13 20:14:37 | [Mutex] isItemNotified: retracted:item:notifieditem-b412470b-0f8c-434e-9e5d-d5058471698a:admin@localhost :: true

retrieveItemsFromNodes 0.058s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a"
}

2019-10-13 20:14:37 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "item-id": "item-b412470b-0f8c-434e-9e5d-d5058471698a",
    "item": [
        "<item id=\"item-b412470b-0f8c-434e-9e5d-d5058471698a\"><test>item-b412470b-0f8c-434e-9e5d-d5058471698a</test></item>"
    ]
}

2019-10-13 20:14:37 | [Mutex] notify: [retrieved:item:item-b412470b-0f8c-434e-9e5d-d5058471698a:payload-matches:true:localhost]

2019-10-13 20:14:37 | [Mutex] received everything.

2019-10-13 20:14:37 | [Mutex] isItemNotified: retrieved:item:item-b412470b-0f8c-434e-9e5d-d5058471698a:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-10-13 20:14:37 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
        "node-d1249c0a-a076-4c97-999e-5471514ca80d"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-cc384fee-a43c-4ee1-96ab-fab0ea94e525)"
}

2019-10-13 20:14:37 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.019s
2019-10-13 20:14:36 |

2019-10-13 20:14:36 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:36 | ------------------------------------

2019-10-13 20:14:36 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "jids": [
        "admin@localhost"
    ]
}

2019-10-13 20:14:36 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.075s
2019-10-13 20:14:37 |

2019-10-13 20:14:37 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 20:14:37 | ------------------------------------

2019-10-13 20:14:37 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-cc384fee-a43c-4ee1-96ab-fab0ea94e525",
    "jids": [
        "admin@localhost"
    ]
}

2019-10-13 20:14:37 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}