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

Test duration: 8.913s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.116s
2019-11-21 05:57:10 |

2019-11-21 05:57:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:10 | ------------------------------------

2019-11-21 05:57:10 | [Mutex] waiting for: [configured:node:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:node-8a757e76-bcd6-4dec-b363-0875865502a0]

2019-11-21 05:57:11 | [Mutex] received everything.

2019-11-21 05:57:11 | [Mutex] isItemNotified: configured:node:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:node-8a757e76-bcd6-4dec-b363-0875865502a0 :: true

2019-11-21 05:57:12 | [Mutex] waiting for: [received:nodes:669279ae-747c-4864-8d68-80576d36d88d:localhost]

2019-11-21 05:57:12 | [Mutex] received everything.

2019-11-21 05:57:12 | [Mutex] isItemNotified: received:node:669279ae-747c-4864-8d68-80576d36d88d:localhost:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d :: true

2019-11-21 05:57:12 | [Mutex] waiting for: [received:nodes:c010c205-2286-4c1b-a181-28ff4e3710cc:localhost]

2019-11-21 05:57:12 | [Mutex] received everything.

2019-11-21 05:57:12 | [Mutex] isItemNotified: received:node:c010c205-2286-4c1b-a181-28ff4e3710cc:localhost:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d :: false

createNodes 1.649s
2019-11-21 05:57:08 |

2019-11-21 05:57:08 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:08 | ------------------------------------

2019-11-21 05:57:08 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "pubsub#title": "Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d"
}

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

2019-11-21 05:57:09 | [Mutex] waiting for: [received:nodes:f64f0b16-773b-4488-8018-a2ab1b06bbb4:localhost]

2019-11-21 05:57:09 | [Mutex] received everything.

2019-11-21 05:57:09 | [Mutex] isItemNotified: received:node:f64f0b16-773b-4488-8018-a2ab1b06bbb4:localhost:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d :: true

createSubnodes 1.031s
2019-11-21 05:57:09 |

2019-11-21 05:57:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:09 | ------------------------------------

2019-11-21 05:57:09 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-8a757e76-bcd6-4dec-b363-0875865502a0",
    "pubsub#title": "Node 8a757e76-bcd6-4dec-b363-0875865502a0"
}

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

2019-11-21 05:57:10 | [Mutex] waiting for: [received:nodes:2d632c92-82b9-4201-bb3d-603ef14c0c12:localhost]

2019-11-21 05:57:10 | [Mutex] received everything.

2019-11-21 05:57:10 | [Mutex] isItemNotified: received:node:2d632c92-82b9-4201-bb3d-603ef14c0c12:localhost:node-8a757e76-bcd6-4dec-b363-0875865502a0:Node 8a757e76-bcd6-4dec-b363-0875865502a0 :: true

deleteNodes 1.034s
2019-11-21 05:57:15 |

2019-11-21 05:57:15 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:15 | ------------------------------------

2019-11-21 05:57:15 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-8a757e76-bcd6-4dec-b363-0875865502a0"
}

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

2019-11-21 05:57:16 | [Mutex] waiting for: [received:nodes:ef5a7fe8-a658-422e-82e2-05bbac58ec3e:localhost]

2019-11-21 05:57:16 | [Mutex] waiting for: [received:nodes:ef5a7fe8-a658-422e-82e2-05bbac58ec3e:localhost]

2019-11-21 05:57:16 | [Mutex] received everything.

2019-11-21 05:57:16 | [Mutex] isItemNotified: received:node:ef5a7fe8-a658-422e-82e2-05bbac58ec3e:localhost:node-8a757e76-bcd6-4dec-b363-0875865502a0:Node 8a757e76-bcd6-4dec-b363-0875865502a0 :: false

deleteSubnodes 1.037s
2019-11-21 05:57:14 |

2019-11-21 05:57:14 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:14 | ------------------------------------

2019-11-21 05:57:14 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d"
}

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

2019-11-21 05:57:15 | [Mutex] waiting for: [received:nodes:eb80aefd-5eb5-41e3-ad2e-452e29807a98:localhost]

2019-11-21 05:57:15 | [Mutex] received everything.

2019-11-21 05:57:15 | [Mutex] isItemNotified: received:node:eb80aefd-5eb5-41e3-ad2e-452e29807a98:localhost:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d :: false

2019-11-21 05:57:15 | [Mutex] waiting for: [received:nodes:fca87d41-8dc3-4920-8a5d-659f93d7f828:localhost]

2019-11-21 05:57:15 | [Mutex] received everything.

2019-11-21 05:57:15 | [Mutex] isItemNotified: received:node:fca87d41-8dc3-4920-8a5d-659f93d7f828:localhost:node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d:Node 1519bdfd-fe7e-4784-b5af-d0597b92ea5d :: false

publishItemsToNodes 0.035s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "entry": "<test>item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2</test>",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2"
}

2019-11-21 05:57:13 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2"
}

2019-11-21 05:57:13 | [Mutex] waiting for: [published:item:notifieditem-9b5a3b59-09b1-49cf-92ee-95e0a02084b2:admin@localhost]

2019-11-21 05:57:13 | [Mutex] received everything.

2019-11-21 05:57:13 | [Mutex] isItemNotified: published:item:notifieditem-9b5a3b59-09b1-49cf-92ee-95e0a02084b2:admin@localhost :: true

retractItemsFromNodes 0.055s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2"
}

2019-11-21 05:57:13 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2"
}

2019-11-21 05:57:13 | [Mutex] received everything.

2019-11-21 05:57:13 | [Mutex] isItemNotified: retracted:item:notifieditem-9b5a3b59-09b1-49cf-92ee-95e0a02084b2:admin@localhost :: true

retrieveItemsFromNodes 0.068s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2"
}

2019-11-21 05:57:13 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "item-id": "item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2",
    "item": [
        "<item id=\"item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2\"><test>item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2</test></item>"
    ]
}

2019-11-21 05:57:13 | [Mutex] notify: [retrieved:item:item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2:payload-matches:true:localhost]

2019-11-21 05:57:13 | [Mutex] received everything.

2019-11-21 05:57:13 | [Mutex] isItemNotified: retrieved:item:item-9b5a3b59-09b1-49cf-92ee-95e0a02084b2:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-11-21 05:57:13 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
        "node-8a757e76-bcd6-4dec-b363-0875865502a0"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d)"
}

2019-11-21 05:57:13 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.021s
2019-11-21 05:57:12 |

2019-11-21 05:57:12 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:12 | ------------------------------------

2019-11-21 05:57:12 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-21 05:57:12 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.091s
2019-11-21 05:57:13 |

2019-11-21 05:57:13 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-21 05:57:13 | ------------------------------------

2019-11-21 05:57:13 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-1519bdfd-fe7e-4784-b5af-d0597b92ea5d",
    "jids": [
        "admin@localhost"
    ]
}

2019-11-21 05:57:13 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}