frontend icon indicating copy to clipboard operation
frontend copied to clipboard

WorkspaceSaga test case passing inconsistently

Open teekaytai opened this issue 3 years ago • 7 comments

In the file src/commons/sagas/__tests__/WorkspaceSaga.ts, the test labelled "does not show infinite loop error if coinflip is false" currently passes or fails randomly even when no code is edited.

The error is "TypeError: Cannot read properties of undefined (reading 'explain')"

image

teekaytai avatar Jan 30 '22 14:01 teekaytai

Hi @teekaytai! I cant seem to reproduce this issue on my end. Could you check if you have the latest master branch and dependencies installed?

chownces avatar Feb 01 '22 03:02 chownces

Hi! Just double checked by cloning the repo again and running yarn install and yarn run format. Running yarn run test, the test still fails some of the time. Not sure if it helps but I'm on Windows and using WSL. My node version is the LTS version 16.13.2.

teekaytai avatar Feb 01 '22 10:02 teekaytai

I do see this test case fail occasionally as well, not entirely sure why but I'm using WSL as well, seems to occur when my CPU usage is higher image

ngxingyu avatar Feb 02 '22 16:02 ngxingyu

I occasionally get the same issue as well, on both Ubuntu 20.0.4 and Fedora 34:

Screenshot from 2022-02-04 18-43-00

It seems to randomly pass some of the times, and fail at other times.

lhw-1 avatar Feb 04 '22 10:02 lhw-1

Same here. @JoeyChenSmart can you look into this? Tx.

martin-henz avatar Feb 04 '22 15:02 martin-henz

Noted, will take a look. Side note: since we're not doing any 'experiments' with the infinite loop detector for now, should we remove the coinflip functionality (where we disable the detector 50% of the time)?

JoeyChenSmart avatar Feb 04 '22 15:02 JoeyChenSmart

Yes, I think we have shown that the infinite loop detector is effective and has a positive impact on learning. We can remove the coin flip for now, until we resume experiments, perhaps for Sem 1 AY2022/23.

martin-henz avatar Feb 08 '22 01:02 martin-henz