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

Test duration: 8.852s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.110s
2020-06-16 23:22:20 |

2020-06-16 23:22:20 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:20 | ------------------------------------

2020-06-16 23:22:20 | [Mutex] waiting for: [configured:node:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:node-4385bb5e-17ef-4bc6-8715-9108e57c459d]

2020-06-16 23:22:21 | [Mutex] received everything.

2020-06-16 23:22:21 | [Mutex] isItemNotified: configured:node:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:node-4385bb5e-17ef-4bc6-8715-9108e57c459d :: true

2020-06-16 23:22:22 | [Mutex] waiting for: [received:nodes:0f076dda-73fd-45eb-a35e-864ea027002e:localhost]

2020-06-16 23:22:22 | [Mutex] received everything.

2020-06-16 23:22:22 | [Mutex] isItemNotified: received:node:0f076dda-73fd-45eb-a35e-864ea027002e:localhost:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a :: true

2020-06-16 23:22:22 | [Mutex] waiting for: [received:nodes:0e6e0193-64b0-4cea-8887-236bef6d1815:localhost]

2020-06-16 23:22:22 | [Mutex] received everything.

2020-06-16 23:22:22 | [Mutex] isItemNotified: received:node:0e6e0193-64b0-4cea-8887-236bef6d1815:localhost:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a :: false

createNodes 1.560s
2020-06-16 23:22:18 |

2020-06-16 23:22:18 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:18 | ------------------------------------

2020-06-16 23:22:18 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "pubsub#title": "Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a"
}

2020-06-16 23:22:18 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 23:22:19 | [Mutex] waiting for: [received:nodes:9aedaa5a-efe3-4b94-b5be-8ef0f3119699:localhost]

2020-06-16 23:22:19 | [Mutex] received everything.

2020-06-16 23:22:19 | [Mutex] isItemNotified: received:node:9aedaa5a-efe3-4b94-b5be-8ef0f3119699:localhost:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a :: true

createSubnodes 1.031s
2020-06-16 23:22:19 |

2020-06-16 23:22:19 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:19 | ------------------------------------

2020-06-16 23:22:19 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-4385bb5e-17ef-4bc6-8715-9108e57c459d",
    "pubsub#title": "Node 4385bb5e-17ef-4bc6-8715-9108e57c459d"
}

2020-06-16 23:22:19 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 23:22:20 | [Mutex] waiting for: [received:nodes:8ab51bdb-2533-42fd-af9c-110f6d4d1697:localhost]

2020-06-16 23:22:20 | [Mutex] waiting for: [received:nodes:8ab51bdb-2533-42fd-af9c-110f6d4d1697:localhost]

2020-06-16 23:22:20 | [Mutex] received everything.

2020-06-16 23:22:20 | [Mutex] isItemNotified: received:node:8ab51bdb-2533-42fd-af9c-110f6d4d1697:localhost:node-4385bb5e-17ef-4bc6-8715-9108e57c459d:Node 4385bb5e-17ef-4bc6-8715-9108e57c459d :: true

deleteNodes 1.021s
2020-06-16 23:22:25 |

2020-06-16 23:22:25 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:25 | ------------------------------------

2020-06-16 23:22:25 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-4385bb5e-17ef-4bc6-8715-9108e57c459d"
}

2020-06-16 23:22:25 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 23:22:26 | [Mutex] waiting for: [received:nodes:6c7aea07-68f1-4b92-b8e6-d5e29652d6b0:localhost]

2020-06-16 23:22:26 | [Mutex] waiting for: [received:nodes:6c7aea07-68f1-4b92-b8e6-d5e29652d6b0:localhost]

2020-06-16 23:22:26 | [Mutex] received everything.

2020-06-16 23:22:26 | [Mutex] isItemNotified: received:node:6c7aea07-68f1-4b92-b8e6-d5e29652d6b0:localhost:node-4385bb5e-17ef-4bc6-8715-9108e57c459d:Node 4385bb5e-17ef-4bc6-8715-9108e57c459d :: false

deleteSubnodes 1.031s
2020-06-16 23:22:24 |

2020-06-16 23:22:24 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:24 | ------------------------------------

2020-06-16 23:22:24 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a"
}

2020-06-16 23:22:24 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-16 23:22:25 | [Mutex] waiting for: [received:nodes:aca39c48-8584-48bf-944a-72223791d179:localhost]

2020-06-16 23:22:25 | [Mutex] received everything.

2020-06-16 23:22:25 | [Mutex] isItemNotified: received:node:aca39c48-8584-48bf-944a-72223791d179:localhost:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a :: false

2020-06-16 23:22:25 | [Mutex] waiting for: [received:nodes:46270809-aad7-49d0-8273-226089d3d0ab:localhost]

2020-06-16 23:22:25 | [Mutex] received everything.

2020-06-16 23:22:25 | [Mutex] isItemNotified: received:node:46270809-aad7-49d0-8273-226089d3d0ab:localhost:node-29262e6f-5c4d-4e94-ae57-578f4c92a44a:Node 29262e6f-5c4d-4e94-ae57-578f4c92a44a :: false

publishItemsToNodes 0.043s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "entry": "<test>item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9</test>",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9"
}

2020-06-16 23:22:23 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9"
}

2020-06-16 23:22:23 | [Mutex] waiting for: [published:item:notifieditem-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9:admin@localhost]

2020-06-16 23:22:23 | [Mutex] received everything.

2020-06-16 23:22:23 | [Mutex] isItemNotified: published:item:notifieditem-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9:admin@localhost :: true

retractItemsFromNodes 0.060s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9"
}

2020-06-16 23:22:23 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9"
}

2020-06-16 23:22:23 | [Mutex] received everything.

2020-06-16 23:22:23 | [Mutex] isItemNotified: retracted:item:notifieditem-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9:admin@localhost :: true

retrieveItemsFromNodes 0.055s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9"
}

2020-06-16 23:22:23 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "item-id": "item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9",
    "item": [
        "<item id=\"item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9\"><test>item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9</test></item>"
    ]
}

2020-06-16 23:22:23 | [Mutex] notify: [retrieved:item:item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9:payload-matches:true:localhost]

2020-06-16 23:22:23 | [Mutex] received everything.

2020-06-16 23:22:23 | [Mutex] isItemNotified: retrieved:item:item-e8ea54b3-9154-4a3a-bb4c-a629e0813cc9:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-06-16 23:22:23 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
        "test",
        "node-4385bb5e-17ef-4bc6-8715-9108e57c459d"
    ]
}

retrieveUserSubscriptionsWithRegex 0.052s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-29262e6f-5c4d-4e94-ae57-578f4c92a44a)"
}

2020-06-16 23:22:23 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.018s
2020-06-16 23:22:22 |

2020-06-16 23:22:22 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:22 | ------------------------------------

2020-06-16 23:22:22 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-16 23:22:22 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.060s
2020-06-16 23:22:23 |

2020-06-16 23:22:23 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-16 23:22:23 | ------------------------------------

2020-06-16 23:22:23 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-29262e6f-5c4d-4e94-ae57-578f4c92a44a",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-16 23:22:23 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}