Skip to content

Commit

Permalink
fix test_memory_leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Voronezhskii committed Jun 24, 2023
1 parent 7ea1cf3 commit 220e83d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ton_client/src/client/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ fn test_invalid_params_error_secret_stripped() {

#[tokio::test]
async fn test_memory_leak() {
for _ in 0..1 {
let ctx = create_context(
r#"
{
"network": { "endpoints": ["http://localhost"] },
"queries_protocol": "WS"
}"#.to_string());
for _ in 0..100 {
let config = json!({
"network": {
"endpoints": TestClient::endpoints(),
"queries_protocol": "WS",
}
});
let ctx = create_context(config.to_string());
let context = serde_json::from_str::<Value>(&ctx).unwrap()["result"].as_i64().unwrap() as u32;
{
let context = Runtime::required_context(context).unwrap();
Expand Down

0 comments on commit 220e83d

Please sign in to comment.