Open fyziktom opened 2 years ago
It is starting work as I expecting :)
Today, I have added handling to ask multiple requests by multiple clients. Here is the test function
Here is the result of the test:
Invoking TestVEDriversLite.FluxTests.MultipleClientsGetMultipleNFTFromInstance("14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e,3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e")
Loading the Veframe instances list...
OK
Loaded info about 5 of Veframe instances.
Initializing 5 of Veframe instances...
Instance - 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432, 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432-161.97.117.15 - initialized connection with result: True, 161.97.117.15 is Connected
Instance - 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432, 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432-161.97.117.142 - initialized connection with result: True, 161.97.117.142 is Connected
double info about port...skiping this instance 92.117.133.163:16187.
Instance - 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432, 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432-183.89.48.89 - initialized connection with result: True, 183.89.48.89 is Connected
double info about port...skiping this instance 183.89.48.89:16137.
Initialized.
Average Ping: 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432 - 167 ms.
Average Ping: 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432 - 182 ms.
Average Ping: 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432 - 361 ms.
-------------------
End.
---------------------ClientId------------------------
Task-0-firstNFT
---------------------Topic - Task-0-firstNFT------------------------
api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------ClientId------------------------
Task-1-firstNFT
---------------------Topic - Task-1-firstNFT------------------------
api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
Request for api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-1-firstNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-2-firstNFT
---------------------Topic - Task-2-firstNFT------------------------
api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
Request for api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-2-firstNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-3-firstNFT
---------------------Topic - Task-3-firstNFT------------------------
api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
Request for api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-3-firstNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-4-firstNFT
---------------------Topic - Task-4-firstNFT------------------------
api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
Request for api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-4-firstNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-5-secondNFT
---------------------Topic - Task-5-secondNFT------------------------
api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------ClientId------------------------
Task-6-secondNFT
---------------------Topic - Task-6-secondNFT------------------------
api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
Request for api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-6-secondNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-7-secondNFT
---------------------Topic - Task-7-secondNFT------------------------
api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
Request for api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-7-secondNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-8-secondNFT
---------------------Topic - Task-8-secondNFT------------------------
api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
Request for api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-8-secondNFT will get result from the existing instance.
---------------------ClientId------------------------
Task-9-secondNFT
---------------------Topic - Task-9-secondNFT------------------------
api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
Request for api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e with parameters already exists in 2e887cc15662b55663491322a9a90f4418ad6657554df432499e327de0dad432. Client Task-9-secondNFT will get result from the existing instance.
---------------------Response - Task-1-firstNFT------------------------
Status: True, Topic: api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------Data - Task-1-firstNFT------------------------
{
"age": 0,
"surname": "Svoboda",
"nickname": "fyziktom",
"id": "",
"relationshipStat...
-----------------------------------------------
---------------------Response - Task-2-firstNFT------------------------
Status: True, Topic: api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------Data - Task-2-firstNFT------------------------
{
"age": 0,
"surname": "Svoboda",
"nickname": "fyziktom",
"id": "",
"relationshipStat...
-----------------------------------------------
---------------------Response - Task-3-firstNFT------------------------
Status: True, Topic: api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------Data - Task-3-firstNFT------------------------
{
"age": 0,
"surname": "Svoboda",
"nickname": "fyziktom",
"id": "",
"relationshipStat...
-----------------------------------------------
---------------------Response - Task-4-firstNFT------------------------
Status: True, Topic: api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------Data - Task-4-firstNFT------------------------
{
"age": 0,
"surname": "Svoboda",
"nickname": "fyziktom",
"id": "",
"relationshipStat...
-----------------------------------------------
---------------------Response - Task-0-firstNFT------------------------
Status: True, Topic: api/GetNFT/14551152c78cf25265ef006202cb271e344c131070d9d4f5aa309f041907b23e
---------------------Data - Task-0-firstNFT------------------------
{
"age": 0,
"surname": "Svoboda",
"nickname": "fyziktom",
"id": "",
"relationshipStat...
-----------------------------------------------
---------------------Response - Task-6-secondNFT------------------------
Status: True, Topic: api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------Data - Task-6-secondNFT------------------------
{
"mintAuthorAddress": "NdwsAeeugaEaxRaddnHE591X1CQjezZZPF",
"eventAddress": "",
"eventId":...
-----------------------------------------------
---------------------Response - Task-7-secondNFT------------------------
Status: True, Topic: api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------Data - Task-7-secondNFT------------------------
{
"mintAuthorAddress": "NdwsAeeugaEaxRaddnHE591X1CQjezZZPF",
"eventAddress": "",
"eventId":...
-----------------------------------------------
---------------------Response - Task-8-secondNFT------------------------
Status: True, Topic: api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------Data - Task-8-secondNFT------------------------
{
"mintAuthorAddress": "NdwsAeeugaEaxRaddnHE591X1CQjezZZPF",
"eventAddress": "",
"eventId":...
-----------------------------------------------
---------------------Response - Task-9-secondNFT------------------------
Status: True, Topic: api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------Data - Task-9-secondNFT------------------------
{
"mintAuthorAddress": "NdwsAeeugaEaxRaddnHE591X1CQjezZZPF",
"eventAddress": "",
"eventId":...
-----------------------------------------------
---------------------Response - Task-5-secondNFT------------------------
Status: True, Topic: api/GetNFT/3ae47ec3dc3e70a0395cbfd41248c9c07e1c6071ca6a7c60536b61a4d2b6350e
---------------------Data - Task-5-secondNFT------------------------
{
"mintAuthorAddress": "NdwsAeeugaEaxRaddnHE591X1CQjezZZPF",
"eventAddress": "",
"eventId":...
-----------------------------------------------
End.
I will need to little tune up the test to provide some mixture of the tasks.
SonarCloud Quality Gate failed.