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

Test duration: 9.050s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.095s
2020-05-26 00:13:04 |

2020-05-26 00:13:04 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:04 | ------------------------------------

2020-05-26 00:13:04 | [Mutex] waiting for: [configured:node:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02]

2020-05-26 00:13:04 | [Mutex] received everything.

2020-05-26 00:13:04 | [Mutex] isItemNotified: configured:node:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02 :: true

2020-05-26 00:13:05 | [Mutex] waiting for: [received:nodes:448cde62-049f-4df9-91f7-6e534bb6d88b:localhost]

2020-05-26 00:13:05 | [Mutex] received everything.

2020-05-26 00:13:05 | [Mutex] isItemNotified: received:node:448cde62-049f-4df9-91f7-6e534bb6d88b:localhost:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:Node 1eaa1248-11c5-4083-9902-48c4f1c6150c :: true

2020-05-26 00:13:05 | [Mutex] waiting for: [received:nodes:d5bc7112-e611-4422-8e1d-68226a454131:localhost]

2020-05-26 00:13:05 | [Mutex] received everything.

2020-05-26 00:13:05 | [Mutex] isItemNotified: received:node:d5bc7112-e611-4422-8e1d-68226a454131:localhost:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:Node 1eaa1248-11c5-4083-9902-48c4f1c6150c :: false

createNodes 1.683s
2020-05-26 00:13:01 |

2020-05-26 00:13:01 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:01 | ------------------------------------

2020-05-26 00:13:02 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "pubsub#title": "Node 1eaa1248-11c5-4083-9902-48c4f1c6150c"
}

2020-05-26 00:13:02 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-05-26 00:13:03 | [Mutex] waiting for: [received:nodes:c89877c3-2b07-4b3a-a9bf-754e2ad8ed49:localhost]

2020-05-26 00:13:03 | [Mutex] waiting for: [received:nodes:c89877c3-2b07-4b3a-a9bf-754e2ad8ed49:localhost]

2020-05-26 00:13:03 | [Mutex] received everything.

2020-05-26 00:13:03 | [Mutex] isItemNotified: received:node:c89877c3-2b07-4b3a-a9bf-754e2ad8ed49:localhost:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:Node 1eaa1248-11c5-4083-9902-48c4f1c6150c :: true

createSubnodes 1.030s
2020-05-26 00:13:03 |

2020-05-26 00:13:03 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:03 | ------------------------------------

2020-05-26 00:13:03 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02",
    "pubsub#title": "Node d2d14bb6-fad5-4048-bc7e-bb2e40b0da02"
}

2020-05-26 00:13:03 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-05-26 00:13:04 | [Mutex] waiting for: [received:nodes:3c9769bf-4fc4-4059-8638-0400d9e15748:localhost]

2020-05-26 00:13:04 | [Mutex] received everything.

2020-05-26 00:13:04 | [Mutex] isItemNotified: received:node:3c9769bf-4fc4-4059-8638-0400d9e15748:localhost:node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02:Node d2d14bb6-fad5-4048-bc7e-bb2e40b0da02 :: true

deleteNodes 1.022s
2020-05-26 00:13:08 |

2020-05-26 00:13:08 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:08 | ------------------------------------

2020-05-26 00:13:08 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02"
}

2020-05-26 00:13:08 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-05-26 00:13:09 | [Mutex] waiting for: [received:nodes:708b2cd0-30e9-454d-b9c7-bf3f6424f664:localhost]

2020-05-26 00:13:09 | [Mutex] received everything.

2020-05-26 00:13:09 | [Mutex] isItemNotified: received:node:708b2cd0-30e9-454d-b9c7-bf3f6424f664:localhost:node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02:Node d2d14bb6-fad5-4048-bc7e-bb2e40b0da02 :: false

deleteSubnodes 1.024s
2020-05-26 00:13:07 |

2020-05-26 00:13:07 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:07 | ------------------------------------

2020-05-26 00:13:07 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c"
}

2020-05-26 00:13:07 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-05-26 00:13:08 | [Mutex] waiting for: [received:nodes:aac45c62-37cf-4df7-9e52-cb1fb60b6172:localhost]

2020-05-26 00:13:08 | [Mutex] received everything.

2020-05-26 00:13:08 | [Mutex] isItemNotified: received:node:aac45c62-37cf-4df7-9e52-cb1fb60b6172:localhost:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:Node 1eaa1248-11c5-4083-9902-48c4f1c6150c :: false

2020-05-26 00:13:08 | [Mutex] waiting for: [received:nodes:9e9c709f-0f0f-447e-9775-b2567f65d1f1:localhost]

2020-05-26 00:13:08 | [Mutex] received everything.

2020-05-26 00:13:08 | [Mutex] isItemNotified: received:node:9e9c709f-0f0f-447e-9775-b2567f65d1f1:localhost:node-1eaa1248-11c5-4083-9902-48c4f1c6150c:Node 1eaa1248-11c5-4083-9902-48c4f1c6150c :: false

publishItemsToNodes 0.039s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "entry": "<test>item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba</test>",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba"
}

2020-05-26 00:13:06 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba"
}

2020-05-26 00:13:06 | [Mutex] waiting for: [published:item:notifieditem-d2f4f11b-58e1-4d4b-8607-091f9ef983ba:admin@localhost]

2020-05-26 00:13:06 | [Mutex] received everything.

2020-05-26 00:13:06 | [Mutex] isItemNotified: published:item:notifieditem-d2f4f11b-58e1-4d4b-8607-091f9ef983ba:admin@localhost :: true

retractItemsFromNodes 0.080s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba"
}

2020-05-26 00:13:06 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba"
}

2020-05-26 00:13:06 | [Mutex] received everything.

2020-05-26 00:13:06 | [Mutex] isItemNotified: retracted:item:notifieditem-d2f4f11b-58e1-4d4b-8607-091f9ef983ba:admin@localhost :: true

retrieveItemsFromNodes 0.072s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba"
}

2020-05-26 00:13:06 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "item-id": "item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba",
    "item": [
        "<item id=\"item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba\"><test>item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba</test></item>"
    ]
}

2020-05-26 00:13:06 | [Mutex] notify: [retrieved:item:item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba:payload-matches:true:localhost]

2020-05-26 00:13:06 | [Mutex] received everything.

2020-05-26 00:13:06 | [Mutex] isItemNotified: retrieved:item:item-d2f4f11b-58e1-4d4b-8607-091f9ef983ba:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.051s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2020-05-26 00:13:06 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
        "node-d2d14bb6-fad5-4048-bc7e-bb2e40b0da02"
    ]
}

retrieveUserSubscriptionsWithRegex 0.051s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-1eaa1248-11c5-4083-9902-48c4f1c6150c)"
}

2020-05-26 00:13:06 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.017s
2020-05-26 00:13:05 |

2020-05-26 00:13:05 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:05 | ------------------------------------

2020-05-26 00:13:05 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "jids": [
        "admin@localhost"
    ]
}

2020-05-26 00:13:05 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.068s
2020-05-26 00:13:06 |

2020-05-26 00:13:06 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 00:13:06 | ------------------------------------

2020-05-26 00:13:06 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-1eaa1248-11c5-4083-9902-48c4f1c6150c",
    "jids": [
        "admin@localhost"
    ]
}

2020-05-26 00:13:06 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}