From 0de8ec8e7385a119a413bc3b54de94538288e2b0 Mon Sep 17 00:00:00 2001 From: "Alisher A. Khassanov" Date: Fri, 1 Nov 2024 13:24:49 +0500 Subject: [PATCH] Fix tests regression --- pallets/ddc-verification/src/lib.rs | 4 +- pallets/ddc-verification/src/tests.rs | 60 +++++++++++++-------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/pallets/ddc-verification/src/lib.rs b/pallets/ddc-verification/src/lib.rs index bb66c4aed..4eac18ecd 100644 --- a/pallets/ddc-verification/src/lib.rs +++ b/pallets/ddc-verification/src/lib.rs @@ -83,8 +83,8 @@ pub mod pallet { const SUCCESS_CODE: u16 = 200; const _BUF_SIZE: usize = 128; const RESPONSE_TIMEOUT: u64 = 20000; - const BUCKETS_AGGREGATES_FETCH_BATCH_SIZE: usize = 100; - const NODES_AGGREGATES_FETCH_BATCH_SIZE: usize = 10; + pub const BUCKETS_AGGREGATES_FETCH_BATCH_SIZE: usize = 100; + pub const NODES_AGGREGATES_FETCH_BATCH_SIZE: usize = 10; #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] diff --git a/pallets/ddc-verification/src/tests.rs b/pallets/ddc-verification/src/tests.rs index 5498fb2a2..2129d5488 100644 --- a/pallets/ddc-verification/src/tests.rs +++ b/pallets/ddc-verification/src/tests.rs @@ -137,7 +137,7 @@ fn fetch_node_aggregates_works() { // Mock HTTP request and response let pending_request = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId={}", host, port, era_id), + uri: format!("http://{}:{}/activity/nodes?eraId={}&limit={}", host, port, era_id, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(nodes_activity_json.as_bytes().to_vec()), sent: true, ..Default::default() @@ -225,7 +225,7 @@ fn fetch_bucket_aggregates_works() { // Mock HTTP request and response let pending_request = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId={}", host, port, era_id), + uri: format!("http://{}:{}/activity/buckets?eraId={}&limit={}", host, port, era_id, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(customers_activity_json.as_bytes().to_vec()), sent: true, ..Default::default() @@ -1596,7 +1596,7 @@ fn bucket_sub_aggregates_are_fetched_and_grouped() { let pending_request1 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=476817", host1, port), + uri: format!("http://{}:{}/activity/buckets?eraId=476817&limit={}", host1, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa318","stored_bytes":578,"transferred_bytes":578,"number_of_puts":2,"number_of_gets":0}]},{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa319","stored_bytes":0,"transferred_bytes":505,"number_of_puts":0,"number_of_gets":1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -1604,7 +1604,7 @@ fn bucket_sub_aggregates_are_fetched_and_grouped() { let pending_request2 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=476817", host2, port), + uri: format!("http://{}:{}/activity/buckets?eraId=476817&limit={}", host2, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa318","stored_bytes":578,"transferred_bytes":578,"number_of_puts":2,"number_of_gets":0}]},{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa319","stored_bytes":0,"transferred_bytes":506,"number_of_puts":0,"number_of_gets":1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -1612,7 +1612,7 @@ fn bucket_sub_aggregates_are_fetched_and_grouped() { let pending_request3 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=476817", host3, port), + uri: format!("http://{}:{}/activity/buckets?eraId=476817&limit={}", host3, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa318","stored_bytes":578,"transferred_bytes":578,"number_of_puts":2,"number_of_gets":0}]},{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa319","stored_bytes":0,"transferred_bytes":505,"number_of_puts":0,"number_of_gets":1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -1620,7 +1620,7 @@ fn bucket_sub_aggregates_are_fetched_and_grouped() { let pending_request4 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=476817", host4, port), + uri: format!("http://{}:{}/activity/buckets?eraId=476817&limit={}", host4, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[]}]"#.to_vec()), sent: true, ..Default::default() @@ -1628,7 +1628,7 @@ fn bucket_sub_aggregates_are_fetched_and_grouped() { let pending_request5 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=476817", host5, port), + uri: format!("http://{}:{}/activity/buckets?eraId=476817&limit={}", host5, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id":90235,"stored_bytes":0,"transferred_bytes":38,"number_of_puts":0,"number_of_gets":1,"sub_aggregates":[{"NodeID":"0xb6186f80dce7190294665ab53860de2841383bb202c562bb8b81a624351fa320","stored_bytes":578,"transferred_bytes":578,"number_of_puts":2,"number_of_gets":0}]}]"#.to_vec()), sent: true, ..Default::default() @@ -1861,7 +1861,7 @@ fn node_aggregates_are_fetched_and_grouped() { let pending_request1 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=476817", host1, port), + uri: format!("http://{}:{}/activity/nodes?eraId=476817&limit={}", host1, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -1869,7 +1869,7 @@ fn node_aggregates_are_fetched_and_grouped() { let pending_request2 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=476817", host2, port), + uri: format!("http://{}:{}/activity/nodes?eraId=476817&limit={}", host2, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 48,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -1877,7 +1877,7 @@ fn node_aggregates_are_fetched_and_grouped() { let pending_request3 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=476817", host3, port), + uri: format!("http://{}:{}/activity/nodes?eraId=476817&limit={}", host3, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97}]"#.to_vec()), sent: true, ..Default::default() @@ -1885,7 +1885,7 @@ fn node_aggregates_are_fetched_and_grouped() { let pending_request4 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=476817", host4, port), + uri: format!("http://{}:{}/activity/nodes?eraId=476817&limit={}", host4, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -1893,7 +1893,7 @@ fn node_aggregates_are_fetched_and_grouped() { let pending_request5 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=476817", host5, port), + uri: format!("http://{}:{}/activity/nodes?eraId=476817&limit={}", host5, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0xfc28d5f5bb10212077a8654f62c4f8f0b5ab985fc322a51f5a3c75943b29194b","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97}]"#.to_vec()), sent: true, ..Default::default() @@ -2646,7 +2646,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request1 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host1, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host1, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2654,7 +2654,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request2 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host2, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host2, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2662,7 +2662,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request3 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host3, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host3, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2670,7 +2670,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request4 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host4, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host4, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2678,7 +2678,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request5 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host5, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host5, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2686,7 +2686,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request6 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host6, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host6, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2694,7 +2694,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request7 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host7, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host7, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2702,7 +2702,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request8 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host8, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host8, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2710,7 +2710,7 @@ fn test_single_ocw_pallet_integration() { let node_pending_request9 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/nodes?eraId=5738616", host9, port), + uri: format!("http://{}:{}/activity/nodes?eraId=5738616&limit={}", host9, port, pallet::NODES_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"node_id": "0x48594f1fd4f05135914c42b03e63b61f6a3e4c537ccee3dbac555ef6df371b7e","stored_bytes": 675613289,"transferred_bytes": 1097091579,"number_of_puts": 889,"number_of_gets": 97},{"node_id": "0x9ef98ad9c3626ba725e78d76cfcfc4b4d07e84f0388465bc7eb992e3e117234a","stored_bytes": 0, "transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]"#.to_vec()), sent: true, ..Default::default() @@ -2718,7 +2718,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request1 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host1, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host1, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id": 90235,"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2726,7 +2726,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request2 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host2, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host2, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2734,7 +2734,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request3 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host3, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host3, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2742,7 +2742,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request4 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host4, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host4, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2750,7 +2750,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request5 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host5, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host5, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2758,7 +2758,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request6 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host6, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host6, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2766,7 +2766,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request7 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host7, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host7, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"bucket_id": 90235,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2774,7 +2774,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request8 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host8, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host8, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id": 90235,"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default() @@ -2782,7 +2782,7 @@ fn test_single_ocw_pallet_integration() { let bucket_pending_request9 = PendingRequest { method: "GET".to_string(), - uri: format!("http://{}:{}/activity/buckets?eraId=5738616", host9, port), + uri: format!("http://{}:{}/activity/buckets?eraId=5738616&limit={}", host9, port, pallet::BUCKETS_AGGREGATES_FETCH_BATCH_SIZE), response: Some(br#"[{"bucket_id": 90235,"stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1,"sub_aggregates": [{"NodeID": "0xbe26b2458fb0c9df4ec26ec5ba083051402b2a3b9d4a7fe6106fe9f8b5efde2c","stored_bytes": 0,"transferred_bytes": 38,"number_of_puts": 0,"number_of_gets": 1}]}]"#.to_vec()), sent: true, ..Default::default()