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

Test duration: 8.829s

Passed Tests
tigase.tests.pubsub.TestRestApiUsingJSON
configureNodes 1.096s
2020-06-30 00:31:57 |

2020-06-30 00:31:57 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:57 | ------------------------------------

2020-06-30 00:31:57 | [Mutex] waiting for: [configured:node:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:node-041e9dfc-42a3-4d7b-8386-bc458cb94488]

2020-06-30 00:31:57 | [Mutex] received everything.

2020-06-30 00:31:57 | [Mutex] isItemNotified: configured:node:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:node-041e9dfc-42a3-4d7b-8386-bc458cb94488 :: true

2020-06-30 00:31:58 | [Mutex] waiting for: [received:nodes:a9404951-ebbf-4d2b-b2d4-8c3d2f82ab19:localhost]

2020-06-30 00:31:58 | [Mutex] received everything.

2020-06-30 00:31:58 | [Mutex] isItemNotified: received:node:a9404951-ebbf-4d2b-b2d4-8c3d2f82ab19:localhost:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0 :: true

2020-06-30 00:31:58 | [Mutex] waiting for: [received:nodes:e3a4aa8f-dd41-44bd-8f72-f6f5af02fc1d:localhost]

2020-06-30 00:31:58 | [Mutex] received everything.

2020-06-30 00:31:58 | [Mutex] isItemNotified: received:node:e3a4aa8f-dd41-44bd-8f72-f6f5af02fc1d:localhost:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0 :: false

createNodes 1.669s
2020-06-30 00:31:55 |

2020-06-30 00:31:55 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:55 | ------------------------------------

2020-06-30 00:31:55 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "leaf",
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "pubsub#title": "Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0"
}

2020-06-30 00:31:55 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-30 00:31:56 | [Mutex] waiting for: [received:nodes:feaeb5ec-d307-4cbb-b193-b8f1ee40730a:localhost]

2020-06-30 00:31:56 | [Mutex] received everything.

2020-06-30 00:31:56 | [Mutex] isItemNotified: received:node:feaeb5ec-d307-4cbb-b193-b8f1ee40730a:localhost:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0 :: true

createSubnodes 1.027s
2020-06-30 00:31:56 |

2020-06-30 00:31:56 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:56 | ------------------------------------

2020-06-30 00:31:56 | on localhost executing action create-node with content type application/json and payload:
{
    "owner": "admin@localhost",
    "pubsub#node_type": "collection",
    "node": "node-041e9dfc-42a3-4d7b-8386-bc458cb94488",
    "pubsub#title": "Node 041e9dfc-42a3-4d7b-8386-bc458cb94488"
}

2020-06-30 00:31:56 | from localhost for action create-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-30 00:31:57 | [Mutex] waiting for: [received:nodes:e776df53-b914-462a-837f-c9c9c3b2dd0f:localhost]

2020-06-30 00:31:57 | [Mutex] received everything.

2020-06-30 00:31:57 | [Mutex] isItemNotified: received:node:e776df53-b914-462a-837f-c9c9c3b2dd0f:localhost:node-041e9dfc-42a3-4d7b-8386-bc458cb94488:Node 041e9dfc-42a3-4d7b-8386-bc458cb94488 :: true

deleteNodes 1.018s
2020-06-30 00:32:02 |

2020-06-30 00:32:02 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:32:02 | ------------------------------------

2020-06-30 00:32:02 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-041e9dfc-42a3-4d7b-8386-bc458cb94488"
}

2020-06-30 00:32:02 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-30 00:32:03 | [Mutex] waiting for: [received:nodes:412a9e45-e601-4bfc-be6c-acfdca719b58:localhost]

2020-06-30 00:32:03 | [Mutex] received everything.

2020-06-30 00:32:03 | [Mutex] isItemNotified: received:node:412a9e45-e601-4bfc-be6c-acfdca719b58:localhost:node-041e9dfc-42a3-4d7b-8386-bc458cb94488:Node 041e9dfc-42a3-4d7b-8386-bc458cb94488 :: false

deleteSubnodes 1.021s
2020-06-30 00:32:01 |

2020-06-30 00:32:01 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:32:01 | ------------------------------------

2020-06-30 00:32:01 | on localhost executing action delete-node with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0"
}

2020-06-30 00:32:01 | from localhost for action delete-node got result code 200 and payload
{
    "Note": "Operation successful"
}

2020-06-30 00:32:02 | [Mutex] waiting for: [received:nodes:818ebd65-807a-4626-a008-8dfd20079892:localhost]

2020-06-30 00:32:02 | [Mutex] received everything.

2020-06-30 00:32:02 | [Mutex] isItemNotified: received:node:818ebd65-807a-4626-a008-8dfd20079892:localhost:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0 :: false

2020-06-30 00:32:02 | [Mutex] waiting for: [received:nodes:96af6c02-4e9d-45ca-9f39-91ef8775f35f:localhost]

2020-06-30 00:32:02 | [Mutex] received everything.

2020-06-30 00:32:02 | [Mutex] isItemNotified: received:node:96af6c02-4e9d-45ca-9f39-91ef8775f35f:localhost:node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0:Node 5aaec5bc-5a79-4d46-8772-2e6db7a17ca0 :: false

publishItemsToNodes 0.030s
2020-06-30 00:31:59 |

2020-06-30 00:31:59 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:59 | ------------------------------------

2020-06-30 00:31:59 | on localhost executing action publish-item with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "entry": "<test>item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b</test>",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b"
}

2020-06-30 00:31:59 | from localhost for action publish-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b"
}

2020-06-30 00:31:59 | [Mutex] waiting for: [published:item:notifieditem-4985ebd8-08a1-4804-ad1d-dc93a2497d8b:admin@localhost]

2020-06-30 00:31:59 | [Mutex] received everything.

2020-06-30 00:31:59 | [Mutex] isItemNotified: published:item:notifieditem-4985ebd8-08a1-4804-ad1d-dc93a2497d8b:admin@localhost :: true

retractItemsFromNodes 0.052s
2020-06-30 00:32:00 |

2020-06-30 00:32:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:32:00 | ------------------------------------

2020-06-30 00:32:00 | on localhost executing action delete-item with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b"
}

2020-06-30 00:32:00 | from localhost for action delete-item got result code 200 and payload
{
    "Note": "Operation successful",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b"
}

2020-06-30 00:32:00 | [Mutex] received everything.

2020-06-30 00:32:00 | [Mutex] isItemNotified: retracted:item:notifieditem-4985ebd8-08a1-4804-ad1d-dc93a2497d8b:admin@localhost :: true

retrieveItemsFromNodes 0.070s
2020-06-30 00:31:59 |

2020-06-30 00:31:59 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:59 | ------------------------------------

2020-06-30 00:31:59 | on localhost executing action retrieve-item with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b"
}

2020-06-30 00:31:59 | from localhost for action retrieve-item got result code 200 and payload
{
    "title": "Retrive PubSub node item",
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "item-id": "item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b",
    "item": [
        "<item id=\"item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b\"><test>item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b</test></item>"
    ]
}

2020-06-30 00:31:59 | [Mutex] notify: [retrieved:item:item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b:payload-matches:true:localhost]

2020-06-30 00:31:59 | [Mutex] received everything.

2020-06-30 00:31:59 | [Mutex] isItemNotified: retrieved:item:item-4985ebd8-08a1-4804-ad1d-dc93a2497d8b:payload-matches:true:localhost :: true

retrieveUserSubscriptions 0.047s
2020-06-30 00:31:59 |

2020-06-30 00:31:59 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:59 | ------------------------------------

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

2020-06-30 00:32:00 | from localhost for action retrieve-user-subscriptions got result code 200 and payload
{
    "nodes": [
        "node-041e9dfc-42a3-4d7b-8386-bc458cb94488",
        "test",
        "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0"
    ]
}

retrieveUserSubscriptionsWithRegex 0.048s
2020-06-30 00:32:00 |

2020-06-30 00:32:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:32:00 | ------------------------------------

2020-06-30 00:32:00 | on localhost executing action retrieve-user-subscriptions with content type application/json and payload:
{
    "jid": "admin@localhost",
    "node-pattern": "(?!node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0)"
}

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

subscribeNodes 1.010s
2020-06-30 00:31:58 |

2020-06-30 00:31:58 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:31:58 | ------------------------------------

2020-06-30 00:31:58 | on localhost executing action subscribe-node with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "jids": [
        "admin@localhost"
    ]
}

2020-06-30 00:31:58 | from localhost for action subscribe-node got result code 200 and payload
{
    "Note": "Operation successful"
}

unsubscribeNodes 1.063s
2020-06-30 00:32:00 |

2020-06-30 00:32:00 | null / [TestClass name=class tigase.tests.pubsub.TestRestApiUsingJSON]

2020-06-30 00:32:00 | ------------------------------------

2020-06-30 00:32:00 | on localhost executing action unsubscribe-node with content type application/json and payload:
{
    "node": "node-5aaec5bc-5a79-4d46-8772-2e6db7a17ca0",
    "jids": [
        "admin@localhost"
    ]
}

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