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

Test duration: 9.033s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.099s
2019-11-26 19:16:54 |

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

2019-11-26 19:16:54 | ------------------------------------

2019-11-26 19:16:54 | [Mutex] waiting for: [configured:node:node-a781e883-6f28-484e-9727-aef2170a0e87:node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49]

2019-11-26 19:16:54 | [Mutex] received everything.

2019-11-26 19:16:54 | [Mutex] isItemNotified: configured:node:node-a781e883-6f28-484e-9727-aef2170a0e87:node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49 :: true

2019-11-26 19:16:55 | [Mutex] waiting for: [received:nodes:1ec69829-7479-4e9c-a59e-1fb1f8ce968f:localhost]

2019-11-26 19:16:55 | [Mutex] received everything.

2019-11-26 19:16:55 | [Mutex] isItemNotified: received:node:1ec69829-7479-4e9c-a59e-1fb1f8ce968f:localhost:node-a781e883-6f28-484e-9727-aef2170a0e87:Node a781e883-6f28-484e-9727-aef2170a0e87 :: true

2019-11-26 19:16:55 | [Mutex] waiting for: [received:nodes:8e82fbec-cab7-4f43-95df-55c7d4c76d6c:localhost]

2019-11-26 19:16:55 | [Mutex] waiting for: [received:nodes:8e82fbec-cab7-4f43-95df-55c7d4c76d6c:localhost]

2019-11-26 19:16:55 | [Mutex] received everything.

2019-11-26 19:16:55 | [Mutex] isItemNotified: received:node:8e82fbec-cab7-4f43-95df-55c7d4c76d6c:localhost:node-a781e883-6f28-484e-9727-aef2170a0e87:Node a781e883-6f28-484e-9727-aef2170a0e87 :: false

createNodes 1.791s
2019-11-26 19:16:51 |

2019-11-26 19:16:51 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-11-26 19:16:51 | ------------------------------------

2019-11-26 19:16:51 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "pubsub#title": "Node a781e883-6f28-484e-9727-aef2170a0e87"
}

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

2019-11-26 19:16:52 | [Mutex] waiting for: [received:nodes:80629afe-39a9-4eb3-bc47-9306f74394ad:localhost]

2019-11-26 19:16:52 | [Mutex] received everything.

2019-11-26 19:16:52 | [Mutex] isItemNotified: received:node:80629afe-39a9-4eb3-bc47-9306f74394ad:localhost:node-a781e883-6f28-484e-9727-aef2170a0e87:Node a781e883-6f28-484e-9727-aef2170a0e87 :: true

createSubnodes 1.031s
2019-11-26 19:16:52 |

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

2019-11-26 19:16:52 | ------------------------------------

2019-11-26 19:16:52 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49",
    "pubsub#title": "Node 7d0eef5b-88cc-4fb7-8293-3ac9f2673e49"
}

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

2019-11-26 19:16:54 | [Mutex] waiting for: [received:nodes:17d63d7a-edc2-44ee-b591-79bd50e330db:localhost]

2019-11-26 19:16:54 | [Mutex] waiting for: [received:nodes:17d63d7a-edc2-44ee-b591-79bd50e330db:localhost]

2019-11-26 19:16:54 | [Mutex] received everything.

2019-11-26 19:16:54 | [Mutex] isItemNotified: received:node:17d63d7a-edc2-44ee-b591-79bd50e330db:localhost:node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49:Node 7d0eef5b-88cc-4fb7-8293-3ac9f2673e49 :: true

deleteNodes 1.017s
2019-11-26 19:16:58 |

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

2019-11-26 19:16:58 | ------------------------------------

2019-11-26 19:16:58 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49"
}

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

2019-11-26 19:16:59 | [Mutex] waiting for: [received:nodes:3d54dae1-a00b-43c1-960e-e50dbd16d1da:localhost]

2019-11-26 19:16:59 | [Mutex] received everything.

2019-11-26 19:16:59 | [Mutex] isItemNotified: received:node:3d54dae1-a00b-43c1-960e-e50dbd16d1da:localhost:node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49:Node 7d0eef5b-88cc-4fb7-8293-3ac9f2673e49 :: false

deleteSubnodes 1.059s
2019-11-26 19:16:57 |

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

2019-11-26 19:16:57 | ------------------------------------

2019-11-26 19:16:57 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87"
}

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

2019-11-26 19:16:58 | [Mutex] waiting for: [received:nodes:76b7ba96-02c3-46bd-b727-cee30f53ed04:localhost]

2019-11-26 19:16:58 | [Mutex] waiting for: [received:nodes:76b7ba96-02c3-46bd-b727-cee30f53ed04:localhost]

2019-11-26 19:16:58 | [Mutex] received everything.

2019-11-26 19:16:58 | [Mutex] isItemNotified: received:node:76b7ba96-02c3-46bd-b727-cee30f53ed04:localhost:node-a781e883-6f28-484e-9727-aef2170a0e87:Node a781e883-6f28-484e-9727-aef2170a0e87 :: false

2019-11-26 19:16:58 | [Mutex] waiting for: [received:nodes:b18d0608-06f3-47af-ab8f-f87541d7e776:localhost]

2019-11-26 19:16:58 | [Mutex] received everything.

2019-11-26 19:16:58 | [Mutex] isItemNotified: received:node:b18d0608-06f3-47af-ab8f-f87541d7e776:localhost:node-a781e883-6f28-484e-9727-aef2170a0e87:Node a781e883-6f28-484e-9727-aef2170a0e87 :: false

publishItemsToNodes 0.045s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

2019-11-26 19:16:56 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "entry": "<test>item-32a6835c-092d-45a4-8370-904c970bd9a5</test>",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5"
}

2019-11-26 19:16:56 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5"
}

2019-11-26 19:16:56 | [Mutex] waiting for: [published:item:notifieditem-32a6835c-092d-45a4-8370-904c970bd9a5:admin@localhost]

2019-11-26 19:16:56 | [Mutex] received everything.

2019-11-26 19:16:56 | [Mutex] isItemNotified: published:item:notifieditem-32a6835c-092d-45a4-8370-904c970bd9a5:admin@localhost :: true

retractItemsFromNodes 0.063s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

2019-11-26 19:16:56 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5"
}

2019-11-26 19:16:56 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5"
}

2019-11-26 19:16:56 | [Mutex] received everything.

2019-11-26 19:16:56 | [Mutex] isItemNotified: retracted:item:notifieditem-32a6835c-092d-45a4-8370-904c970bd9a5:admin@localhost :: true

retrieveItemsFromNodes 0.077s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

2019-11-26 19:16:56 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5"
}

2019-11-26 19:16:56 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "item-id": "item-32a6835c-092d-45a4-8370-904c970bd9a5",
    "item": [
        "<item id=\"item-32a6835c-092d-45a4-8370-904c970bd9a5\"><test>item-32a6835c-092d-45a4-8370-904c970bd9a5</test></item>"
    ]
}

2019-11-26 19:16:56 | [Mutex] notify: [retrieved:item:item-32a6835c-092d-45a4-8370-904c970bd9a5:payload-matches:true:localhost]

2019-11-26 19:16:56 | [Mutex] received everything.

2019-11-26 19:16:56 | [Mutex] isItemNotified: retrieved:item:item-32a6835c-092d-45a4-8370-904c970bd9a5:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

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

2019-11-26 19:16:56 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-a781e883-6f28-484e-9727-aef2170a0e87",
        "node-7d0eef5b-88cc-4fb7-8293-3ac9f2673e49"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

2019-11-26 19:16:56 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-a781e883-6f28-484e-9727-aef2170a0e87)"
}

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

subscribeNodes 1.014s
2019-11-26 19:16:55 |

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

2019-11-26 19:16:55 | ------------------------------------

2019-11-26 19:16:55 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.055s
2019-11-26 19:16:56 |

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

2019-11-26 19:16:56 | ------------------------------------

2019-11-26 19:16:56 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-a781e883-6f28-484e-9727-aef2170a0e87",
    "jids": [
        "admin@localhost"
    ]
}

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