-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn test issues - does not connect to uniswap - gettingtimeouts #2
Comments
Hi @mjsmorgan, thanks for your interest in Cafe-Chi. When I wrote the tests I was focused on my local machine, on which I could connect to Geth via IPC. It's probably timing out for you because it takes longer to communicate with Infura/Alchemy APIs than it does to communicate over IPC. I'll try to push a fix this weekend, but in the mean time you should be able to fix this by adding Example: it("should retrieve name", async () => {
return Pair.chi_eth
.name()(web3.ganache)
.then(x => assert(x === "Uniswap V2"));
}).timeout(10000); See this thread for other options. You may be able to just update the |
@haydenshively thanks for your work. |
@martinsteldinger I noticed the same thing using iftop.....it is connecting, but the connection is rejected for some reason |
This only happened once, so I don't think it's the root cause |
In const infura = {
type: "WS_Infura",
envKeyID: "PROVIDER_INFURA_ID" // This is the name of the env variable storing the ID, NOT THE ID ITSELF
};
const alchemy = {
type: "WS_Alchemy",
envKeyKey: "PROVIDER_ALCHEMY_KEY" // This is the name of the env variable storing the key, NOT THE KEY ITSELF
};
web3.mainnet = new MultiSendProvider("mainnet", [infura, alchemy]); Feel free to delete either the infura or alchemy entry; you only need one. But Do make sure that If the issue remains after checking this, feel free to reopen this issue. Thanks! |
I am having an issue when I run yarn test. It looks like it is not connecting and receives a timeout:
yarn test
yarn run v1.22.5
$ mocha --file './tests/setup.js' 'tests/**/*.test.js' --recursive
logging || Winston Test
[winston] Attempt to write logs with no transports {"level":"info","message":"🚨 This is a test"}
✓ should send Slack message
network/webthree/uniswap || Pair Test
1) should retrieve name
2) should retrieve decimals
3) should retrieve token0
4) should retrieve token1
5) should retrieve reserves
6) should compute amount received
1 passing (12s)
6 failing
network/webthree/uniswap || Pair Test
should retrieve name:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
network/webthree/uniswap || Pair Test
should retrieve decimals:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
network/webthree/uniswap || Pair Test
should retrieve token0:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
network/webthree/uniswap || Pair Test
should retrieve token1:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
network/webthree/uniswap || Pair Test
should retrieve reserves:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
network/webthree/uniswap || Pair Test
should compute amount received:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/opt/Cafe-Chi/tests/network/webthree/uniswap/pair.test.js)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
^C
The text was updated successfully, but these errors were encountered: