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

Test duration: 8.864s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.099s
2020-01-02 19:20:47 |

2020-01-02 19:20:47 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:47 | ------------------------------------

2020-01-02 19:20:47 | [Mutex] waiting for: [configured:node:node-291532f9-b057-441f-884d-31cec02ef93f:node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560]

2020-01-02 19:20:47 | [Mutex] received everything.

2020-01-02 19:20:47 | [Mutex] isItemNotified: configured:node:node-291532f9-b057-441f-884d-31cec02ef93f:node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560 :: true

2020-01-02 19:20:48 | [Mutex] waiting for: [received:nodes:8849e8ee-0ba5-477a-8d80-4ece8e302f0b:localhost]

2020-01-02 19:20:48 | [Mutex] received everything.

2020-01-02 19:20:48 | [Mutex] isItemNotified: received:node:8849e8ee-0ba5-477a-8d80-4ece8e302f0b:localhost:node-291532f9-b057-441f-884d-31cec02ef93f:Node 291532f9-b057-441f-884d-31cec02ef93f :: true

2020-01-02 19:20:48 | [Mutex] waiting for: [received:nodes:149c91c0-4b1d-4a1b-bfee-c8c36e3cfaa5:localhost]

2020-01-02 19:20:48 | [Mutex] received everything.

2020-01-02 19:20:48 | [Mutex] isItemNotified: received:node:149c91c0-4b1d-4a1b-bfee-c8c36e3cfaa5:localhost:node-291532f9-b057-441f-884d-31cec02ef93f:Node 291532f9-b057-441f-884d-31cec02ef93f :: false

createNodes 1.616s
2020-01-02 19:20:44 |

2020-01-02 19:20:44 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:44 | ------------------------------------

2020-01-02 19:20:44 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "pubsub#title": "Node 291532f9-b057-441f-884d-31cec02ef93f"
}

2020-01-02 19:20:45 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-01-02 19:20:46 | [Mutex] waiting for: [received:nodes:8ac7f497-1452-4b50-a545-f5b747c2c936:localhost]

2020-01-02 19:20:46 | [Mutex] received everything.

2020-01-02 19:20:46 | [Mutex] isItemNotified: received:node:8ac7f497-1452-4b50-a545-f5b747c2c936:localhost:node-291532f9-b057-441f-884d-31cec02ef93f:Node 291532f9-b057-441f-884d-31cec02ef93f :: true

createSubnodes 1.028s
2020-01-02 19:20:46 |

2020-01-02 19:20:46 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:46 | ------------------------------------

2020-01-02 19:20:46 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560",
    "pubsub#title": "Node eea4ca7f-9ff2-4ae9-b417-d3afbe31f560"
}

2020-01-02 19:20:46 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-01-02 19:20:47 | [Mutex] waiting for: [received:nodes:8ad1d249-cb35-461e-a1cb-6240160e7b25:localhost]

2020-01-02 19:20:47 | [Mutex] received everything.

2020-01-02 19:20:47 | [Mutex] isItemNotified: received:node:8ad1d249-cb35-461e-a1cb-6240160e7b25:localhost:node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560:Node eea4ca7f-9ff2-4ae9-b417-d3afbe31f560 :: true

deleteNodes 1.019s
2020-01-02 19:20:51 |

2020-01-02 19:20:51 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:51 | ------------------------------------

2020-01-02 19:20:51 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560"
}

2020-01-02 19:20:51 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-01-02 19:20:52 | [Mutex] waiting for: [received:nodes:dcd75473-f693-4c41-b3dd-66a423af5827:localhost]

2020-01-02 19:20:52 | [Mutex] received everything.

2020-01-02 19:20:52 | [Mutex] isItemNotified: received:node:dcd75473-f693-4c41-b3dd-66a423af5827:localhost:node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560:Node eea4ca7f-9ff2-4ae9-b417-d3afbe31f560 :: false

deleteSubnodes 1.028s
2020-01-02 19:20:50 |

2020-01-02 19:20:50 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:50 | ------------------------------------

2020-01-02 19:20:50 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f"
}

2020-01-02 19:20:50 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-01-02 19:20:51 | [Mutex] waiting for: [received:nodes:acd7e1c4-51f8-4089-ad5e-3220ac95648d:localhost]

2020-01-02 19:20:51 | [Mutex] received everything.

2020-01-02 19:20:51 | [Mutex] isItemNotified: received:node:acd7e1c4-51f8-4089-ad5e-3220ac95648d:localhost:node-291532f9-b057-441f-884d-31cec02ef93f:Node 291532f9-b057-441f-884d-31cec02ef93f :: false

2020-01-02 19:20:51 | [Mutex] waiting for: [received:nodes:6a2f5a3e-428d-4feb-a585-e92ad43b3308:localhost]

2020-01-02 19:20:51 | [Mutex] received everything.

2020-01-02 19:20:51 | [Mutex] isItemNotified: received:node:6a2f5a3e-428d-4feb-a585-e92ad43b3308:localhost:node-291532f9-b057-441f-884d-31cec02ef93f:Node 291532f9-b057-441f-884d-31cec02ef93f :: false

publishItemsToNodes 0.041s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "entry": "<test>item-165f6cfa-96db-4143-a0c4-4c50276c2e7b</test>",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b"
}

2020-01-02 19:20:49 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b"
}

2020-01-02 19:20:49 | [Mutex] waiting for: [published:item:notifieditem-165f6cfa-96db-4143-a0c4-4c50276c2e7b:admin@localhost]

2020-01-02 19:20:49 | [Mutex] received everything.

2020-01-02 19:20:49 | [Mutex] isItemNotified: published:item:notifieditem-165f6cfa-96db-4143-a0c4-4c50276c2e7b:admin@localhost :: true

retractItemsFromNodes 0.051s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b"
}

2020-01-02 19:20:49 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b"
}

2020-01-02 19:20:49 | [Mutex] received everything.

2020-01-02 19:20:49 | [Mutex] isItemNotified: retracted:item:notifieditem-165f6cfa-96db-4143-a0c4-4c50276c2e7b:admin@localhost :: true

retrieveItemsFromNodes 0.053s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b"
}

2020-01-02 19:20:49 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "item-id": "item-165f6cfa-96db-4143-a0c4-4c50276c2e7b",
    "item": [
        "<item id=\"item-165f6cfa-96db-4143-a0c4-4c50276c2e7b\"><test>item-165f6cfa-96db-4143-a0c4-4c50276c2e7b</test></item>"
    ]
}

2020-01-02 19:20:49 | [Mutex] notify: [retrieved:item:item-165f6cfa-96db-4143-a0c4-4c50276c2e7b:payload-matches:true:localhost]

2020-01-02 19:20:49 | [Mutex] received everything.

2020-01-02 19:20:49 | [Mutex] isItemNotified: retrieved:item:item-165f6cfa-96db-4143-a0c4-4c50276c2e7b:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-01-02 19:20:49 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-eea4ca7f-9ff2-4ae9-b417-d3afbe31f560",
        "node-291532f9-b057-441f-884d-31cec02ef93f"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-291532f9-b057-441f-884d-31cec02ef93f)"
}

2020-01-02 19:20:49 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.008s
2020-01-02 19:20:48 |

2020-01-02 19:20:48 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:48 | ------------------------------------

2020-01-02 19:20:48 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "jids": [
        "admin@localhost"
    ]
}

2020-01-02 19:20:48 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.075s
2020-01-02 19:20:49 |

2020-01-02 19:20:49 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-01-02 19:20:49 | ------------------------------------

2020-01-02 19:20:49 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-291532f9-b057-441f-884d-31cec02ef93f",
    "jids": [
        "admin@localhost"
    ]
}

2020-01-02 19:20:49 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}