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

Test duration: 8.875s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.089s
2020-05-26 23:20:07 |

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

2020-05-26 23:20:07 | ------------------------------------

2020-05-26 23:20:07 | [Mutex] waiting for: [configured:node:node-60184102-5d27-4b21-9907-2cf49bc9ccee:node-defc50c6-b809-4a03-8236-935caeb8fcc1]

2020-05-26 23:20:07 | [Mutex] received everything.

2020-05-26 23:20:07 | [Mutex] isItemNotified: configured:node:node-60184102-5d27-4b21-9907-2cf49bc9ccee:node-defc50c6-b809-4a03-8236-935caeb8fcc1 :: true

2020-05-26 23:20:08 | [Mutex] waiting for: [received:nodes:6f6bd45d-31de-406d-ac8e-e8c3322651d6:localhost]

2020-05-26 23:20:08 | [Mutex] received everything.

2020-05-26 23:20:08 | [Mutex] isItemNotified: received:node:6f6bd45d-31de-406d-ac8e-e8c3322651d6:localhost:node-60184102-5d27-4b21-9907-2cf49bc9ccee:Node 60184102-5d27-4b21-9907-2cf49bc9ccee :: true

2020-05-26 23:20:08 | [Mutex] waiting for: [received:nodes:fbb7f106-2ceb-4f1a-b3cf-bd1d3c0b9890:localhost]

2020-05-26 23:20:08 | [Mutex] received everything.

2020-05-26 23:20:08 | [Mutex] isItemNotified: received:node:fbb7f106-2ceb-4f1a-b3cf-bd1d3c0b9890:localhost:node-60184102-5d27-4b21-9907-2cf49bc9ccee:Node 60184102-5d27-4b21-9907-2cf49bc9ccee :: false

createNodes 1.581s
2020-05-26 23:20:05 |

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

2020-05-26 23:20:05 | ------------------------------------

2020-05-26 23:20:05 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "pubsub#title": "Node 60184102-5d27-4b21-9907-2cf49bc9ccee"
}

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

2020-05-26 23:20:06 | [Mutex] waiting for: [received:nodes:b63df696-9edd-4916-9a32-e3b9b2fffecd:localhost]

2020-05-26 23:20:06 | [Mutex] received everything.

2020-05-26 23:20:06 | [Mutex] isItemNotified: received:node:b63df696-9edd-4916-9a32-e3b9b2fffecd:localhost:node-60184102-5d27-4b21-9907-2cf49bc9ccee:Node 60184102-5d27-4b21-9907-2cf49bc9ccee :: true

createSubnodes 1.016s
2020-05-26 23:20:06 |

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

2020-05-26 23:20:06 | ------------------------------------

2020-05-26 23:20:06 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-defc50c6-b809-4a03-8236-935caeb8fcc1",
    "pubsub#title": "Node defc50c6-b809-4a03-8236-935caeb8fcc1"
}

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

2020-05-26 23:20:07 | [Mutex] waiting for: [received:nodes:d6d1454d-994d-4ef3-94e5-1aad9599ac88:localhost]

2020-05-26 23:20:07 | [Mutex] received everything.

2020-05-26 23:20:07 | [Mutex] isItemNotified: received:node:d6d1454d-994d-4ef3-94e5-1aad9599ac88:localhost:node-defc50c6-b809-4a03-8236-935caeb8fcc1:Node defc50c6-b809-4a03-8236-935caeb8fcc1 :: true

deleteNodes 1.016s
2020-05-26 23:20:12 |

2020-05-26 23:20:12 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:12 | ------------------------------------

2020-05-26 23:20:12 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-defc50c6-b809-4a03-8236-935caeb8fcc1"
}

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

2020-05-26 23:20:13 | [Mutex] waiting for: [received:nodes:b3b2ce79-ff9e-4f77-bec7-e45b89e303bd:localhost]

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

2020-05-26 23:20:13 | [Mutex] isItemNotified: received:node:b3b2ce79-ff9e-4f77-bec7-e45b89e303bd:localhost:node-defc50c6-b809-4a03-8236-935caeb8fcc1:Node defc50c6-b809-4a03-8236-935caeb8fcc1 :: false

deleteSubnodes 1.025s
2020-05-26 23:20:11 |

2020-05-26 23:20:11 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:11 | ------------------------------------

2020-05-26 23:20:11 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee"
}

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

2020-05-26 23:20:12 | [Mutex] waiting for: [received:nodes:d5c260ae-69bd-4636-8877-a06e2ebb5cf0:localhost]

2020-05-26 23:20:12 | [Mutex] waiting for: [received:nodes:d5c260ae-69bd-4636-8877-a06e2ebb5cf0:localhost]

2020-05-26 23:20:12 | [Mutex] received everything.

2020-05-26 23:20:12 | [Mutex] isItemNotified: received:node:d5c260ae-69bd-4636-8877-a06e2ebb5cf0:localhost:node-60184102-5d27-4b21-9907-2cf49bc9ccee:Node 60184102-5d27-4b21-9907-2cf49bc9ccee :: false

2020-05-26 23:20:12 | [Mutex] waiting for: [received:nodes:54c0b890-8acb-468d-8505-a17a2fc0eaad:localhost]

2020-05-26 23:20:12 | [Mutex] received everything.

2020-05-26 23:20:12 | [Mutex] isItemNotified: received:node:54c0b890-8acb-468d-8505-a17a2fc0eaad:localhost:node-60184102-5d27-4b21-9907-2cf49bc9ccee:Node 60184102-5d27-4b21-9907-2cf49bc9ccee :: false

publishItemsToNodes 0.030s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

2020-05-26 23:20:09 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "entry": "<test>item-8ba33d18-08e5-43d4-b529-e776d84f2820</test>",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820"
}

2020-05-26 23:20:09 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820"
}

2020-05-26 23:20:09 | [Mutex] waiting for: [published:item:notifieditem-8ba33d18-08e5-43d4-b529-e776d84f2820:admin@localhost]

2020-05-26 23:20:09 | [Mutex] received everything.

2020-05-26 23:20:09 | [Mutex] isItemNotified: published:item:notifieditem-8ba33d18-08e5-43d4-b529-e776d84f2820:admin@localhost :: true

retractItemsFromNodes 0.052s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

2020-05-26 23:20:09 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820"
}

2020-05-26 23:20:09 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820"
}

2020-05-26 23:20:09 | [Mutex] received everything.

2020-05-26 23:20:09 | [Mutex] isItemNotified: retracted:item:notifieditem-8ba33d18-08e5-43d4-b529-e776d84f2820:admin@localhost :: true

retrieveItemsFromNodes 0.063s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

2020-05-26 23:20:09 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820"
}

2020-05-26 23:20:09 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "item-id": "item-8ba33d18-08e5-43d4-b529-e776d84f2820",
    "item": [
        "<item id=\"item-8ba33d18-08e5-43d4-b529-e776d84f2820\"><test>item-8ba33d18-08e5-43d4-b529-e776d84f2820</test></item>"
    ]
}

2020-05-26 23:20:09 | [Mutex] notify: [retrieved:item:item-8ba33d18-08e5-43d4-b529-e776d84f2820:payload-matches:true:localhost]

2020-05-26 23:20:09 | [Mutex] received everything.

2020-05-26 23:20:09 | [Mutex] isItemNotified: retrieved:item:item-8ba33d18-08e5-43d4-b529-e776d84f2820:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.052s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

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

2020-05-26 23:20:09 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
        "node-defc50c6-b809-4a03-8236-935caeb8fcc1"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

2020-05-26 23:20:09 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-60184102-5d27-4b21-9907-2cf49bc9ccee)"
}

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

subscribeNodes 1.009s
2020-05-26 23:20:08 |

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

2020-05-26 23:20:08 | ------------------------------------

2020-05-26 23:20:08 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "jids": [
        "admin@localhost"
    ]
}

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

unsubscribeNodes 1.104s
2020-05-26 23:20:09 |

2020-05-26 23:20:09 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-05-26 23:20:09 | ------------------------------------

2020-05-26 23:20:09 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-60184102-5d27-4b21-9907-2cf49bc9ccee",
    "jids": [
        "admin@localhost"
    ]
}

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