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

Test duration: 8.954s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.107s
2019-10-13 19:35:08 |

2019-10-13 19:35:08 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:08 | ------------------------------------

2019-10-13 19:35:08 | [Mutex] waiting for: [configured:node:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:node-e087d87c-9210-4286-acf8-eede90ff7767]

2019-10-13 19:35:08 | [Mutex] received everything.

2019-10-13 19:35:08 | [Mutex] isItemNotified: configured:node:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:node-e087d87c-9210-4286-acf8-eede90ff7767 :: true

2019-10-13 19:35:09 | [Mutex] waiting for: [received:nodes:b3d70ebe-8ae0-483b-a061-f5cc37bd6290:localhost]

2019-10-13 19:35:09 | [Mutex] received everything.

2019-10-13 19:35:09 | [Mutex] isItemNotified: received:node:b3d70ebe-8ae0-483b-a061-f5cc37bd6290:localhost:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f :: true

2019-10-13 19:35:09 | [Mutex] waiting for: [received:nodes:65386392-0f27-47ec-b33e-e5a5ecbc92f0:localhost]

2019-10-13 19:35:09 | [Mutex] received everything.

2019-10-13 19:35:09 | [Mutex] isItemNotified: received:node:65386392-0f27-47ec-b33e-e5a5ecbc92f0:localhost:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f :: false

createNodes 1.706s
2019-10-13 19:35:05 |

2019-10-13 19:35:05 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:05 | ------------------------------------

2019-10-13 19:35:06 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "pubsub#title": "Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f"
}

2019-10-13 19:35:06 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 19:35:07 | [Mutex] waiting for: [received:nodes:68039a1c-99d7-4fdf-a4c6-3942e7d4c083:localhost]

2019-10-13 19:35:07 | [Mutex] received everything.

2019-10-13 19:35:07 | [Mutex] isItemNotified: received:node:68039a1c-99d7-4fdf-a4c6-3942e7d4c083:localhost:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f :: true

createSubnodes 1.026s
2019-10-13 19:35:07 |

2019-10-13 19:35:07 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:07 | ------------------------------------

2019-10-13 19:35:07 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-e087d87c-9210-4286-acf8-eede90ff7767",
    "pubsub#title": "Node e087d87c-9210-4286-acf8-eede90ff7767"
}

2019-10-13 19:35:07 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 19:35:08 | [Mutex] waiting for: [received:nodes:3f44d637-7553-4f0d-bf1d-c5fb9fd1a298:localhost]

2019-10-13 19:35:08 | [Mutex] received everything.

2019-10-13 19:35:08 | [Mutex] isItemNotified: received:node:3f44d637-7553-4f0d-bf1d-c5fb9fd1a298:localhost:node-e087d87c-9210-4286-acf8-eede90ff7767:Node e087d87c-9210-4286-acf8-eede90ff7767 :: true

deleteNodes 1.023s
2019-10-13 19:35:12 |

2019-10-13 19:35:12 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:12 | ------------------------------------

2019-10-13 19:35:12 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-e087d87c-9210-4286-acf8-eede90ff7767"
}

2019-10-13 19:35:12 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2019-10-13 19:35:13 | [Mutex] waiting for: [received:nodes:d79dff1d-0d8c-4952-b0be-ddb57114e1b5:localhost]

2019-10-13 19:35:13 | [Mutex] received everything.

2019-10-13 19:35:13 | [Mutex] isItemNotified: received:node:d79dff1d-0d8c-4952-b0be-ddb57114e1b5:localhost:node-e087d87c-9210-4286-acf8-eede90ff7767:Node e087d87c-9210-4286-acf8-eede90ff7767 :: false

deleteSubnodes 1.028s
2019-10-13 19:35:11 |

2019-10-13 19:35:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:11 | ------------------------------------

2019-10-13 19:35:11 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f"
}

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

2019-10-13 19:35:12 | [Mutex] waiting for: [received:nodes:99c023eb-b2c7-48bb-88b5-47d583f05420:localhost]

2019-10-13 19:35:12 | [Mutex] received everything.

2019-10-13 19:35:12 | [Mutex] isItemNotified: received:node:99c023eb-b2c7-48bb-88b5-47d583f05420:localhost:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f :: false

2019-10-13 19:35:12 | [Mutex] waiting for: [received:nodes:79dc7385-dfd8-4668-ae1a-8b4f562444fd:localhost]

2019-10-13 19:35:12 | [Mutex] received everything.

2019-10-13 19:35:12 | [Mutex] isItemNotified: received:node:79dc7385-dfd8-4668-ae1a-8b4f562444fd:localhost:node-0420bb89-3f13-4921-ab07-6cbb3f114f3f:Node 0420bb89-3f13-4921-ab07-6cbb3f114f3f :: false

publishItemsToNodes 0.045s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "entry": "<test>item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d</test>",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d"
}

2019-10-13 19:35:10 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d"
}

2019-10-13 19:35:10 | [Mutex] waiting for: [published:item:notifieditem-cb26df7a-bf01-4ecb-b1e1-778d01efe49d:admin@localhost]

2019-10-13 19:35:10 | [Mutex] received everything.

2019-10-13 19:35:10 | [Mutex] isItemNotified: published:item:notifieditem-cb26df7a-bf01-4ecb-b1e1-778d01efe49d:admin@localhost :: true

retractItemsFromNodes 0.051s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d"
}

2019-10-13 19:35:10 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d"
}

2019-10-13 19:35:10 | [Mutex] received everything.

2019-10-13 19:35:10 | [Mutex] isItemNotified: retracted:item:notifieditem-cb26df7a-bf01-4ecb-b1e1-778d01efe49d:admin@localhost :: true

retrieveItemsFromNodes 0.060s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d"
}

2019-10-13 19:35:10 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "item-id": "item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d",
    "item": [
        "<item id=\"item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d\"><test>item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d</test></item>"
    ]
}

2019-10-13 19:35:10 | [Mutex] notify: [retrieved:item:item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d:payload-matches:true:localhost]

2019-10-13 19:35:10 | [Mutex] received everything.

2019-10-13 19:35:10 | [Mutex] isItemNotified: retrieved:item:item-cb26df7a-bf01-4ecb-b1e1-778d01efe49d:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost"
}

2019-10-13 19:35:10 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
        "node-e087d87c-9210-4286-acf8-eede90ff7767"
    ]
}

retrieveUserSubscriptionsWithRegex 0.047s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-0420bb89-3f13-4921-ab07-6cbb3f114f3f)"
}

2019-10-13 19:35:10 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
       
    ]
}

subscribeNodes 1.011s
2019-10-13 19:35:09 |

2019-10-13 19:35:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:09 | ------------------------------------

2019-10-13 19:35:09 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "jids": [
        "admin@localhost"
    ]
}

2019-10-13 19:35:09 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.063s
2019-10-13 19:35:10 |

2019-10-13 19:35:10 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2019-10-13 19:35:10 | ------------------------------------

2019-10-13 19:35:10 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-0420bb89-3f13-4921-ab07-6cbb3f114f3f",
    "jids": [
        "admin@localhost"
    ]
}

2019-10-13 19:35:10 | from localhost for action unsubscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}