diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13a752bd40..072843d4c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: - if: contains(github.head_ref, 'release--') name: Install dfx run: | - DFXVM_INIT_YES=true DFX_VERSION=0.17.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" + DFXVM_INIT_YES=true DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH # TODO we should use some Action-specific bot account - if: contains(github.head_ref, 'release--') @@ -240,7 +240,7 @@ jobs: - if: ${{ needs.release-candidate-deploy.outputs.should_run_tests }} name: Install dfx run: | - DFXVM_INIT_YES=true DFX_VERSION=0.17.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" + DFXVM_INIT_YES=true DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH - if: ${{ needs.release-candidate-deploy.outputs.should_run_tests }} uses: actions/cache@v3 diff --git a/benchmark/setup.ts b/benchmark/setup.ts index ac749cc053..f3870cd0a2 100644 --- a/benchmark/setup.ts +++ b/benchmark/setup.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; export async function run_setup(argument?: string) { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister create azle`, { stdio: 'inherit' }); diff --git a/examples/apollo_server/test/pretest.ts b/examples/apollo_server/test/pretest.ts index 391f214555..96ef63d321 100644 --- a/examples/apollo_server/test/pretest.ts +++ b/examples/apollo_server/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code apollo_server || true`, { stdio: 'inherit' }); diff --git a/examples/async_await/test/pretest.ts b/examples/async_await/test/pretest.ts index 177e8f2219..ad3436d1c2 100644 --- a/examples/async_await/test/pretest.ts +++ b/examples/async_await/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code async_await || true`, { stdio: 'inherit' }); diff --git a/examples/audio_recorder/test/pretest.ts b/examples/audio_recorder/test/pretest.ts index 790ef2824c..a103aaeb0c 100644 --- a/examples/audio_recorder/test/pretest.ts +++ b/examples/audio_recorder/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code audio_recorder || true`, { stdio: 'inherit' }); diff --git a/examples/bitcoin/dfx.json b/examples/bitcoin/dfx.json index d3ba3b104d..1acb6620e2 100644 --- a/examples/bitcoin/dfx.json +++ b/examples/bitcoin/dfx.json @@ -27,7 +27,10 @@ "networks": { "local": { "bind": "127.0.0.1:8000", - "type": "ephemeral" + "type": "ephemeral", + "replica": { + "subnet_type": "system" + } } }, "defaults": { diff --git a/examples/blob_array/test/pretest.ts b/examples/blob_array/test/pretest.ts index e600497c91..d612450816 100644 --- a/examples/blob_array/test/pretest.ts +++ b/examples/blob_array/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code blob_array || true`, { stdio: 'inherit' }); diff --git a/examples/bytes/test/pretest.ts b/examples/bytes/test/pretest.ts index 488f291937..42a99467f8 100644 --- a/examples/bytes/test/pretest.ts +++ b/examples/bytes/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code bytes_canister || true`, { stdio: 'inherit' }); diff --git a/examples/call_raw/test/pretest.ts b/examples/call_raw/test/pretest.ts index 166406b2ec..9c2381e027 100644 --- a/examples/call_raw/test/pretest.ts +++ b/examples/call_raw/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code call_raw || true`, { stdio: 'inherit' }); diff --git a/examples/candid_encoding/test/pretest.ts b/examples/candid_encoding/test/pretest.ts index f9fe1d5a23..07c27ccefc 100644 --- a/examples/candid_encoding/test/pretest.ts +++ b/examples/candid_encoding/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code candid_encoding || true`, { stdio: 'inherit' }); diff --git a/examples/candid_keywords/test/pretest.ts b/examples/candid_keywords/test/pretest.ts index d3d6daee2d..464f3511fa 100644 --- a/examples/candid_keywords/test/pretest.ts +++ b/examples/candid_keywords/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code candid_keywords || true`, { stdio: 'inherit' }); diff --git a/examples/canister/test/pretest.ts b/examples/canister/test/pretest.ts index 240731945f..288d33d7ba 100644 --- a/examples/canister/test/pretest.ts +++ b/examples/canister/test/pretest.ts @@ -2,8 +2,6 @@ import { execSync } from 'child_process'; import { getCanisterId } from 'azle/dfx'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code canister || true`, { stdio: 'inherit' }); diff --git a/examples/ckbtc/dfx.json b/examples/ckbtc/dfx.json index b2f59e096c..0fcec297c4 100644 --- a/examples/ckbtc/dfx.json +++ b/examples/ckbtc/dfx.json @@ -52,7 +52,10 @@ "networks": { "local": { "bind": "127.0.0.1:8000", - "type": "ephemeral" + "type": "ephemeral", + "replica": { + "subnet_type": "system" + } } }, "defaults": { diff --git a/examples/ckbtc/test/pretest.ts b/examples/ckbtc/test/pretest.ts index 726a7adbdb..5b4d7139c2 100644 --- a/examples/ckbtc/test/pretest.ts +++ b/examples/ckbtc/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - uninstall( 'ckbtc', 'internet_identity', diff --git a/examples/complex_init/test/pretest.ts b/examples/complex_init/test/pretest.ts index 75fdf71c25..872d92c49e 100644 --- a/examples/complex_init/test/pretest.ts +++ b/examples/complex_init/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code complex_init || true`, { stdio: 'inherit' }); diff --git a/examples/complex_types/test/pretest.ts b/examples/complex_types/test/pretest.ts index 23c8b501da..aad040a28e 100644 --- a/examples/complex_types/test/pretest.ts +++ b/examples/complex_types/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code complex_types || true`, { stdio: 'inherit' }); diff --git a/examples/composite_queries/test/pretest.ts b/examples/composite_queries/test/pretest.ts index 81a7613fc7..5584f999be 100644 --- a/examples/composite_queries/test/pretest.ts +++ b/examples/composite_queries/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code canister1 || true`, { stdio: 'inherit' }); diff --git a/examples/counter/test/pretest.ts b/examples/counter/test/pretest.ts index 35560139b8..a633db4bed 100644 --- a/examples/counter/test/pretest.ts +++ b/examples/counter/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code counter || true`, { stdio: 'inherit' }); diff --git a/examples/cross_canister_calls/test/pretest.ts b/examples/cross_canister_calls/test/pretest.ts index cbdbb52455..cc5e15dd0d 100644 --- a/examples/cross_canister_calls/test/pretest.ts +++ b/examples/cross_canister_calls/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code canister1 || true`, { stdio: 'inherit' }); diff --git a/examples/cycles/test/pretest.ts b/examples/cycles/test/pretest.ts index a90a53380e..fd2663e1ca 100644 --- a/examples/cycles/test/pretest.ts +++ b/examples/cycles/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code cycles || true`, { stdio: 'inherit' }); diff --git a/examples/date/test/pretest.ts b/examples/date/test/pretest.ts index e26afe0200..4e8d671bde 100644 --- a/examples/date/test/pretest.ts +++ b/examples/date/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code date || true`, { stdio: 'inherit' }); diff --git a/examples/ethereum_json_rpc/test/pretest.ts b/examples/ethereum_json_rpc/test/pretest.ts index 3cedd9a8bf..253e11bcf0 100644 --- a/examples/ethereum_json_rpc/test/pretest.ts +++ b/examples/ethereum_json_rpc/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code ethereum_json_rpc || true`, { stdio: 'inherit' }); diff --git a/examples/ethers/test/pretest.ts b/examples/ethers/test/pretest.ts index b3f043bd52..81065430f6 100644 --- a/examples/ethers/test/pretest.ts +++ b/examples/ethers/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code ethers || true`, { stdio: 'inherit' }); diff --git a/examples/express/test/pretest.ts b/examples/express/test/pretest.ts index ecdb546854..44f37ede1f 100644 --- a/examples/express/test/pretest.ts +++ b/examples/express/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code express || true`, { stdio: 'inherit' }); diff --git a/examples/file_protocol/test/pretest.ts b/examples/file_protocol/test/pretest.ts index cff92e084c..7868762d47 100644 --- a/examples/file_protocol/test/pretest.ts +++ b/examples/file_protocol/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code backend || true`, { stdio: 'inherit' }); diff --git a/examples/fs/test/pretest.ts b/examples/fs/test/pretest.ts index 3ea2689ecf..5440204f08 100644 --- a/examples/fs/test/pretest.ts +++ b/examples/fs/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code fs || true`, { stdio: 'inherit' }); diff --git a/examples/func_types/test/pretest.ts b/examples/func_types/test/pretest.ts index 95cfa05a22..1de9d06dec 100644 --- a/examples/func_types/test/pretest.ts +++ b/examples/func_types/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code func_types || true`, { stdio: 'inherit' }); diff --git a/examples/generics/test/pretest.ts b/examples/generics/test/pretest.ts index b58adcbcf1..d81207b566 100644 --- a/examples/generics/test/pretest.ts +++ b/examples/generics/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code generics || true`, { stdio: 'inherit' }); diff --git a/examples/guard_functions/test/pretest.ts b/examples/guard_functions/test/pretest.ts index 6425683e02..0a013a15db 100644 --- a/examples/guard_functions/test/pretest.ts +++ b/examples/guard_functions/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code guard_functions || true`, { stdio: 'inherit' }); diff --git a/examples/heartbeat/test/pretest.ts b/examples/heartbeat/test/pretest.ts index aa0b3dbee2..4015926476 100644 --- a/examples/heartbeat/test/pretest.ts +++ b/examples/heartbeat/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code heartbeat_async || true`, { stdio: 'inherit' }); diff --git a/examples/hello_world/README.md b/examples/hello_world/README.md index d4811fe113..8772969258 100644 --- a/examples/hello_world/README.md +++ b/examples/hello_world/README.md @@ -51,7 +51,7 @@ node --version Install the dfx command line tools for managing ICP applications: ```bash -DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" +DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" ``` Check that the installation went smoothly by looking for clean output from the following command: diff --git a/examples/ic_api/test/pretest.ts b/examples/ic_api/test/pretest.ts index 7de306bef5..05703df274 100644 --- a/examples/ic_api/test/pretest.ts +++ b/examples/ic_api/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code ic_api || true`, { stdio: 'inherit' }); diff --git a/examples/icrc/test/pretest.ts b/examples/icrc/test/pretest.ts index ab197b815b..c869c8ca58 100644 --- a/examples/icrc/test/pretest.ts +++ b/examples/icrc/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest(icrcPath: string) { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code proxy || true`, { stdio: 'inherit' }); diff --git a/examples/imports/test/pretest.ts b/examples/imports/test/pretest.ts index 4d5488f377..b1985124d2 100644 --- a/examples/imports/test/pretest.ts +++ b/examples/imports/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code imports || true`, { stdio: 'inherit' }); diff --git a/examples/init/test/pretest.ts b/examples/init/test/pretest.ts index 43c6346a31..965b789738 100644 --- a/examples/init/test/pretest.ts +++ b/examples/init/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code init || true`, { stdio: 'inherit' }); diff --git a/examples/inspect_message/test/pretest.ts b/examples/inspect_message/test/pretest.ts index 19b0b7d4c7..df1f0bfb28 100644 --- a/examples/inspect_message/test/pretest.ts +++ b/examples/inspect_message/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code inspect_message || true`, { stdio: 'inherit' }); diff --git a/examples/key_value_store/test/pretest.ts b/examples/key_value_store/test/pretest.ts index 85ef90ae8f..416ae28fab 100644 --- a/examples/key_value_store/test/pretest.ts +++ b/examples/key_value_store/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code key_value_store || true`, { stdio: 'inherit' }); diff --git a/examples/ledger_canister/test/pretest.ts b/examples/ledger_canister/test/pretest.ts index 7ed9bb509c..a894422e65 100644 --- a/examples/ledger_canister/test/pretest.ts +++ b/examples/ledger_canister/test/pretest.ts @@ -2,8 +2,6 @@ import { execSync } from 'child_process'; import { getCanisterId } from 'azle/dfx'; async function pretest(icp_ledger_path: string) { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code icp_ledger || true`, { stdio: 'inherit' }); diff --git a/examples/list_of_lists/test/pretest.ts b/examples/list_of_lists/test/pretest.ts index ce2dffcaf3..8aa28e557c 100644 --- a/examples/list_of_lists/test/pretest.ts +++ b/examples/list_of_lists/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code list_of_lists || true`, { stdio: 'inherit' }); diff --git a/examples/management_canister/test/pretest.ts b/examples/management_canister/test/pretest.ts index 8ff2f54d70..0c6716dab6 100644 --- a/examples/management_canister/test/pretest.ts +++ b/examples/management_canister/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code management_canister || true`, { stdio: 'inherit' }); diff --git a/examples/manual_reply/test/pretest.ts b/examples/manual_reply/test/pretest.ts index b348fd6dfe..0e4bb6539c 100644 --- a/examples/manual_reply/test/pretest.ts +++ b/examples/manual_reply/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code manual_reply || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/calc/test/pretest.ts b/examples/motoko_examples/calc/test/pretest.ts index 51ab97c122..23698b8626 100644 --- a/examples/motoko_examples/calc/test/pretest.ts +++ b/examples/motoko_examples/calc/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code calc || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/counter/test/pretest.ts b/examples/motoko_examples/counter/test/pretest.ts index 35560139b8..a633db4bed 100644 --- a/examples/motoko_examples/counter/test/pretest.ts +++ b/examples/motoko_examples/counter/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code counter || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/echo/test/pretest.ts b/examples/motoko_examples/echo/test/pretest.ts index 23372f406b..ee078aa67d 100644 --- a/examples/motoko_examples/echo/test/pretest.ts +++ b/examples/motoko_examples/echo/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code echo || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/factorial/test/pretest.ts b/examples/motoko_examples/factorial/test/pretest.ts index 13b1b0c4a6..5d4c2495ab 100644 --- a/examples/motoko_examples/factorial/test/pretest.ts +++ b/examples/motoko_examples/factorial/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code factorial || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/hello-world/test/pretest.ts b/examples/motoko_examples/hello-world/test/pretest.ts index fb453c9c88..874394a70f 100644 --- a/examples/motoko_examples/hello-world/test/pretest.ts +++ b/examples/motoko_examples/hello-world/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code hello_world || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/hello/test/pretest.ts b/examples/motoko_examples/hello/test/pretest.ts index 22a9b6c90f..a0016f5366 100644 --- a/examples/motoko_examples/hello/test/pretest.ts +++ b/examples/motoko_examples/hello/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code hello || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/http_counter/test/pretest.ts b/examples/motoko_examples/http_counter/test/pretest.ts index 33c2c77cd3..bb8665a3d7 100644 --- a/examples/motoko_examples/http_counter/test/pretest.ts +++ b/examples/motoko_examples/http_counter/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code http_counter || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/minimal-counter-dapp/test/pretest.ts b/examples/motoko_examples/minimal-counter-dapp/test/pretest.ts index 36447905b9..47efdecbd3 100644 --- a/examples/motoko_examples/minimal-counter-dapp/test/pretest.ts +++ b/examples/motoko_examples/minimal-counter-dapp/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code minimal_dapp || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/persistent-storage/test/pretest.ts b/examples/motoko_examples/persistent-storage/test/pretest.ts index 1c7ee65983..4747a471b5 100644 --- a/examples/motoko_examples/persistent-storage/test/pretest.ts +++ b/examples/motoko_examples/persistent-storage/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code persistent_storage || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/phone-book/test/pretest.ts b/examples/motoko_examples/phone-book/test/pretest.ts index e9953bf758..b4ae2ed5cb 100644 --- a/examples/motoko_examples/phone-book/test/pretest.ts +++ b/examples/motoko_examples/phone-book/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code phone_book || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/quicksort/test/pretest.ts b/examples/motoko_examples/quicksort/test/pretest.ts index be4b1003b3..4732d013af 100644 --- a/examples/motoko_examples/quicksort/test/pretest.ts +++ b/examples/motoko_examples/quicksort/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code quicksort || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/simple-to-do/test/pretest.ts b/examples/motoko_examples/simple-to-do/test/pretest.ts index d78c0b1db7..f4b0c8d955 100644 --- a/examples/motoko_examples/simple-to-do/test/pretest.ts +++ b/examples/motoko_examples/simple-to-do/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code simple_to_do || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/superheroes/test/pretest.ts b/examples/motoko_examples/superheroes/test/pretest.ts index 9032814af7..6161f42133 100644 --- a/examples/motoko_examples/superheroes/test/pretest.ts +++ b/examples/motoko_examples/superheroes/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code superheroes || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/threshold_ecdsa/test/pretest.ts b/examples/motoko_examples/threshold_ecdsa/test/pretest.ts index 94cd20d3e0..96bdc00776 100644 --- a/examples/motoko_examples/threshold_ecdsa/test/pretest.ts +++ b/examples/motoko_examples/threshold_ecdsa/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code threshold_ecdsa || true`, { stdio: 'inherit' }); diff --git a/examples/motoko_examples/whoami/test/pretest.ts b/examples/motoko_examples/whoami/test/pretest.ts index 368b98c4db..fc2a10c6f4 100644 --- a/examples/motoko_examples/whoami/test/pretest.ts +++ b/examples/motoko_examples/whoami/test/pretest.ts @@ -6,8 +6,6 @@ const someoneIdentity = createIdentity(2); export const someonePrincipal = someoneIdentity.getPrincipal().toString(); async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code whoami || true`, { stdio: 'inherit' }); diff --git a/examples/notify_raw/test/pretest.ts b/examples/notify_raw/test/pretest.ts index cbdbb52455..cc5e15dd0d 100644 --- a/examples/notify_raw/test/pretest.ts +++ b/examples/notify_raw/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code canister1 || true`, { stdio: 'inherit' }); diff --git a/examples/null_example/test/pretest.ts b/examples/null_example/test/pretest.ts index 043757a735..537298beb4 100644 --- a/examples/null_example/test/pretest.ts +++ b/examples/null_example/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code null_example || true`, { stdio: 'inherit' }); diff --git a/examples/optional_types/test/pretest.ts b/examples/optional_types/test/pretest.ts index a619189cd1..99a2b577af 100644 --- a/examples/optional_types/test/pretest.ts +++ b/examples/optional_types/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code optional_types || true`, { stdio: 'inherit' }); diff --git a/examples/outgoing_http_requests/test/pretest.ts b/examples/outgoing_http_requests/test/pretest.ts index 8b7bcc5f18..0d5eaded9b 100644 --- a/examples/outgoing_http_requests/test/pretest.ts +++ b/examples/outgoing_http_requests/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code outgoing_http_requests || true`, { stdio: 'inherit' }); diff --git a/examples/plugins/test/pretest.ts b/examples/plugins/test/pretest.ts index 2803e61047..3d915f9533 100644 --- a/examples/plugins/test/pretest.ts +++ b/examples/plugins/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code plugins || true`, { stdio: 'inherit' }); diff --git a/examples/pre_and_post_upgrade/test/pretest.ts b/examples/pre_and_post_upgrade/test/pretest.ts index f71708655d..e37bc930ee 100644 --- a/examples/pre_and_post_upgrade/test/pretest.ts +++ b/examples/pre_and_post_upgrade/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code pre_and_post_upgrade || true`, { stdio: 'inherit' }); diff --git a/examples/primitive_types/test/pretest.ts b/examples/primitive_types/test/pretest.ts index cdb7f13bda..dd4f921332 100644 --- a/examples/primitive_types/test/pretest.ts +++ b/examples/primitive_types/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code primitive_types || true`, { stdio: 'inherit' }); diff --git a/examples/principal/test/pretest.ts b/examples/principal/test/pretest.ts index 2c05a751c3..925fb6ffe6 100644 --- a/examples/principal/test/pretest.ts +++ b/examples/principal/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code principal || true`, { stdio: 'inherit' }); diff --git a/examples/query/test/pretest.ts b/examples/query/test/pretest.ts index 8f1813a516..dcddc30743 100644 --- a/examples/query/test/pretest.ts +++ b/examples/query/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code query || true`, { stdio: 'inherit' }); diff --git a/examples/randomness/test/pretest.ts b/examples/randomness/test/pretest.ts index 0f4445c7b3..99e8122851 100644 --- a/examples/randomness/test/pretest.ts +++ b/examples/randomness/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code randomness || true`, { stdio: 'inherit' }); diff --git a/examples/recursion/test/pretest.ts b/examples/recursion/test/pretest.ts index 8235602acf..e25a7a13b4 100644 --- a/examples/recursion/test/pretest.ts +++ b/examples/recursion/test/pretest.ts @@ -2,8 +2,6 @@ import { execSync } from 'child_process'; import { getCanisterId } from 'azle/dfx'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code recursive_canister || true`, { stdio: 'inherit' }); diff --git a/examples/rejections/test/pretest.ts b/examples/rejections/test/pretest.ts index 9452ef6f1c..198e35169b 100644 --- a/examples/rejections/test/pretest.ts +++ b/examples/rejections/test/pretest.ts @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx'; import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code rejections || true`, { stdio: 'inherit' }); diff --git a/examples/robust_imports/test/pretest.ts b/examples/robust_imports/test/pretest.ts index 93b95afd65..deebd7dd3e 100644 --- a/examples/robust_imports/test/pretest.ts +++ b/examples/robust_imports/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code robust_imports || true`, { stdio: 'inherit' }); diff --git a/examples/run_time_errors/test/pretest.ts b/examples/run_time_errors/test/pretest.ts index 8d74a4e4e8..f78ad7d72a 100644 --- a/examples/run_time_errors/test/pretest.ts +++ b/examples/run_time_errors/test/pretest.ts @@ -3,8 +3,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code run_time_errors || true`, { stdio: 'inherit' }); diff --git a/examples/simple_erc20/test/pretest.ts b/examples/simple_erc20/test/pretest.ts index d498b9cb13..65078ac7e3 100644 --- a/examples/simple_erc20/test/pretest.ts +++ b/examples/simple_erc20/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code simple_erc20 || true`, { stdio: 'inherit' }); diff --git a/examples/simple_user_accounts/test/pretest.ts b/examples/simple_user_accounts/test/pretest.ts index 7f57070361..e9b479874e 100644 --- a/examples/simple_user_accounts/test/pretest.ts +++ b/examples/simple_user_accounts/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code simple_user_accounts || true`, { stdio: 'inherit' }); diff --git a/examples/sqlite/test/pretest.ts b/examples/sqlite/test/pretest.ts index 88fa8b0926..1a30e3a4e8 100644 --- a/examples/sqlite/test/pretest.ts +++ b/examples/sqlite/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code sqlite || true`, { stdio: 'inherit' }); diff --git a/examples/stable_memory/test/pretest.ts b/examples/stable_memory/test/pretest.ts index c4e9f92f1c..798737b217 100644 --- a/examples/stable_memory/test/pretest.ts +++ b/examples/stable_memory/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code stable_memory || true`, { stdio: 'inherit' }); diff --git a/examples/stable_structures/test/pretest.ts b/examples/stable_structures/test/pretest.ts index e1c05f0df2..6af3cc57dd 100644 --- a/examples/stable_structures/test/pretest.ts +++ b/examples/stable_structures/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code canister1 || true`, { stdio: 'inherit' }); diff --git a/examples/timers/test/pretest.ts b/examples/timers/test/pretest.ts index 5c2033dbbf..cb89c0bf9b 100644 --- a/examples/timers/test/pretest.ts +++ b/examples/timers/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code timers || true`, { stdio: 'inherit' }); diff --git a/examples/tuple_types/test/pretest.ts b/examples/tuple_types/test/pretest.ts index 50f1da07ce..6ba9c982c4 100644 --- a/examples/tuple_types/test/pretest.ts +++ b/examples/tuple_types/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code tuple_types || true`, { stdio: 'inherit' }); diff --git a/examples/update/test/pretest.ts b/examples/update/test/pretest.ts index 81183d4828..507758ca19 100644 --- a/examples/update/test/pretest.ts +++ b/examples/update/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code update || true`, { stdio: 'inherit' }); diff --git a/examples/vanilla_js/test/pretest.ts b/examples/vanilla_js/test/pretest.ts index 385b2a838d..bf51a419ef 100644 --- a/examples/vanilla_js/test/pretest.ts +++ b/examples/vanilla_js/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code vanilla_js || true`, { stdio: 'inherit' }); diff --git a/examples/web_assembly/test/pretest.ts b/examples/web_assembly/test/pretest.ts index 1ffa4d9b77..4a4e2d2ee4 100644 --- a/examples/web_assembly/test/pretest.ts +++ b/examples/web_assembly/test/pretest.ts @@ -1,8 +1,6 @@ import { execSync } from 'child_process'; async function pretest() { - await new Promise((resolve) => setTimeout(resolve, 5000)); - execSync(`dfx canister uninstall-code web_assembly || true`, { stdio: 'inherit' }); diff --git a/package.json b/package.json index 0d7cb9229c..8b8db89186 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { "name": "azle", "version": "0.21.0", - "rust_version": "1.73.0", - "dfx_version": "0.16.1", + "dfx_version": "0.18.0", "description": "TypeScript and JavaScript CDK for the Internet Computer", "scripts": { "typecheck": "tsc --noEmit",