mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic ws load test: use longer value for request offer/answer fields
This commit is contained in:
parent
6f2dc6a510
commit
953154824e
3 changed files with 6 additions and 2 deletions
|
|
@ -5,6 +5,10 @@ use rand_distr::Pareto;
|
|||
pub use aquatic_ws_protocol::*;
|
||||
|
||||
|
||||
/// JSON string used as fake announce offer / offer response
|
||||
pub const JSON_VALUE: &str = r#"{ "offer": "abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh" }"#;
|
||||
|
||||
|
||||
#[derive(PartialEq, Eq, Clone)]
|
||||
pub struct TorrentPeer {
|
||||
pub info_hash: InfoHash,
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ impl Connection {
|
|||
if let Some((peer_id, offer_id)) = self.send_answer {
|
||||
r.to_peer_id = Some(peer_id);
|
||||
r.offer_id = Some(offer_id);
|
||||
r.answer = Some(JsonValue(::serde_json::Value::from("{}")));
|
||||
r.answer = Some(JsonValue(::serde_json::Value::from(JSON_VALUE)));
|
||||
r.offers = None;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ fn create_announce_request(
|
|||
for _ in 0..10 {
|
||||
offers.push(AnnounceRequestOffer {
|
||||
offer_id: OfferId(rng.gen()),
|
||||
offer: JsonValue(::serde_json::Value::from("{}")),
|
||||
offer: JsonValue(::serde_json::Value::from(JSON_VALUE)),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue