Skip to content

Commit

Permalink
chore: bump PocketIC to v5.0.0 (server) and v4.0.0 (library) (#59)
Browse files Browse the repository at this point in the history
This MR bumps PocketIC to v5.0.0 (server) and v4.0.0 (library).

Setting max request time to `None` avoids PocketIC library timeouts due
to long-running update calls.

---------

Co-authored-by: Islam El-Ashi <[email protected]>
  • Loading branch information
mraszyk and ielashi authored Aug 5, 2024
1 parent 47cf3dd commit d4b39a9
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 15 deletions.
114 changes: 103 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ sha256 = "1.5.0"
syn = "1.0"
tempfile = "3.3.0"
wasmparser = "0.119.0"
pocket-ic = "3.1.0"
pocket-ic = "4.0.0"
7 changes: 4 additions & 3 deletions canbench-bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ fn pocket_ic_path() -> PathBuf {
// Downloads PocketIC if it's not already downloaded.
fn maybe_download_pocket_ic(verbose: bool) {
const POCKET_IC_LINUX_SHA: &str =
"f4ed7d378fbdb12483570501d72eb6696ca789010a3479a7b726b2736901bf8a";
"bcdfbe1c72fb9761b086ae0f34f54a6b85b6a7dd7f52f8003b41cd233b164711";
const POCKET_IC_MAC_SHA: &str =
"a4d3903f3932888aa1e2c2c06c1e122a8da98ebd7c0839e02991a62b6e47cefe";
"07cfda0a46b179446509fefab35375e4ec73e4e0cc0facde2fd41d96dadfcf7c";

if pocket_ic_path().exists() {
// PocketIC found. Verify that it's the version we expect it to be.
Expand All @@ -126,7 +126,7 @@ fn maybe_download_pocket_ic(verbose: bool) {

fn download_pocket_ic(verbose: bool) {
const POCKET_IC_URL_PREFIX: &str =
"https://github.com/dfinity/pocketic/releases/download/4.0.0/pocket-ic-x86_64-";
"https://github.com/dfinity/pocketic/releases/download/5.0.0/pocket-ic-x86_64-";
if verbose {
println!("Downloading runtime (will be cached for future uses)...");
}
Expand Down Expand Up @@ -167,6 +167,7 @@ fn run_benchmark(canister_wasm_path: &Path, init_args: Vec<u8>, bench_fn: &str)
std::env::set_var("POCKET_IC_BIN", pocket_ic_path());
std::env::set_var("POCKET_IC_MUTE_SERVER", "1");
let pic = PocketIcBuilder::new()
.with_max_request_time_ms(None)
.with_benchmarking_system_subnet()
.build();
let can_id = pic.create_canister();
Expand Down

0 comments on commit d4b39a9

Please sign in to comment.