freeboardgames / FreeBoardGames.org

FOSS platform for publishing boardgame.io games
https://www.FreeBoardGames.org
GNU Affero General Public License v3.0
252 stars 93 forks source link

[Chess] chess/ai.test.js sometimes takes a really long time to run #469

Open jasonharrison opened 4 years ago

jasonharrison commented 4 years ago

On my server: PASS games/chess/ai.test.ts (73.584s)

It seems to only happen SOMETIMES. I tried 6x times to get this to happen with yarn run test:unit --verbose games/chess/ai but could not reproduce.
I noticed this also happened on Travis:

PASS games/chess/ai.test.ts (73.061s)

https://travis-ci.com/github/freeboardgames/FreeBoardGames.org/builds/158634397

My server and Travis took almost the exact same time to run this test-- very interesting

jasonharrison commented 4 years ago

jason@pool-t7upm3sxg-zdhj ~/p/FreeBoardGames.org:master> yarn run test:unit games/chess yarn run v1.22.4 $ jest -c jest.unit.config.js games/chess [BABEL] Note: The code generator has deoptimised the styling of /home/jason/projects/FreeBoardGames.org/node_modules/react-dom/cjs/react-dom.development.js as it exceeds the max of 500KB. [BABEL] Note: The code generator has deoptimised the styling of /home/jason/projects/FreeBoardGames.org/node_modules/react-dom/cjs/react-dom.development.js as it exceeds the max of 500KB. [BABEL] Note: The code generator has deoptimised the styling of /home/jason/projects/FreeBoardGames.org/node_modules/react-dom/cjs/react-dom.development.js as it exceeds the max of 500KB. PASS games/chess/sound.test.ts (10.406s) PASS games/chess/pieces/knight.test.tsx PASS games/chess/pieces/rook.test.tsx PASS games/chess/pieces/king.test.tsx PASS games/chess/game.test.ts (12.085s) PASS games/chess/pieces/pawn.test.tsx PASS games/chess/pieces/bishop.test.tsx PASS games/chess/pieces/queen.test.tsx [BABEL] Note: The code generator has deoptimised the styling of /home/jason/projects/FreeBoardGames.org/node_modules/three/build/three.js as it exceeds the max of 500KB. PASS games/chess/board.test.tsx (10.278s) PASS games/chess/ai.test.ts (25.618s)

jason@pool-t7upm3sxg-zdhj ~/p/FreeBoardGames.org:master> npx envinfo --system --binaries --npmPackages --markdown

System:

leocaseiro commented 2 years ago

is this a dupe of #153 ?