-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition on proxy server (#374)
* [skip testnet] --------- Co-authored-by: FabijanC <fabijan.corak@gmail.com>
- Loading branch information
Showing
7 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/integrated-devnet-tests/predeployed-accounts-test/check.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { hardhatStarknetTest } from "../../utils/cli-functions"; | ||
import { checkDevnetIsNotRunning } from "../../utils/utils"; | ||
|
||
// Tests race condition on proxy server by making multiple calls to the | ||
// function getAccountFromAddress and that the proxy server | ||
// handles simultaneous requests correctly and that the port assignment | ||
// on the integrated-devnet environment is implemented correctly | ||
(async () => { | ||
await checkDevnetIsNotRunning(); | ||
hardhatStarknetTest("--no-compile test/get-predeployed-accounts.test.ts".split(" ")); | ||
await checkDevnetIsNotRunning(); | ||
})(); |
13 changes: 13 additions & 0 deletions
13
test/integrated-devnet-tests/predeployed-accounts-test/hardhat.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import "@shardlabs/starknet-hardhat-plugin"; | ||
|
||
module.exports = { | ||
starknet: { | ||
network: process.env.NETWORK | ||
}, | ||
networks: { | ||
integratedDevnet: { | ||
venv: "active", | ||
url: "http://127.0.0.1:5050" | ||
} | ||
} | ||
}; |
4 changes: 4 additions & 0 deletions
4
test/integrated-devnet-tests/predeployed-accounts-test/network.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "../../network.schema", | ||
"integrated-devnet": true | ||
} |