Skip to content
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

テストがランダムにコケる(e2e) #7986

Closed
syuilo opened this issue Nov 14, 2021 · 14 comments
Closed

テストがランダムにコケる(e2e) #7986

syuilo opened this issue Nov 14, 2021 · 14 comments
Labels
⚠️bug? This might be a bug 🔥high priority ❓needs more investigation A bug whose causes are unknown

Comments

@syuilo
Copy link
Member

syuilo commented Nov 14, 2021

MisskeyのAuthentication failedエラーが出ることがある
考えられる原因

  • データベースに前のテストケースのデータが残っている(コード上は各テストケース間でリセットしている)
  • クライアントのlocalStorageなどのデータが残っている
@syuilo syuilo added ⚠️bug? This might be a bug ❓needs more investigation A bug whose causes are unknown labels Nov 14, 2021
@syuilo
Copy link
Member Author

syuilo commented Jan 18, 2022

原因を解明+解決するPRを作ってマージされた方に¥3000進呈

@tamaina
Copy link
Contributor

tamaina commented Jan 22, 2022

e2eが落ちるときはmochaが一緒に落ちちゃう場合もある?
やっぱリソースの問題かもしれない?(GitHub Actionsのリソースについて全く知らないけど)

51d21fb
2c47196

@mei23
Copy link
Contributor

mei23 commented Jan 22, 2022

https://docs.github.com/ja/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

2-core CPU
7 GB of RAM memory
14 GB of SSD disk space

@syuilo
Copy link
Member Author

syuilo commented Jan 26, 2022

確率分布
image

@tamaina
Copy link
Contributor

tamaina commented Jan 26, 2022

account.tsのsignoutを呼び出せばトークンが確実に消えるのでエラーがも出なくなる・・・気がする
(NODE_ENV='test'時にsignoutをwindowにインジェクトして呼び出すみたいなことを毎回やるということ)

@tamaina
Copy link
Contributor

tamaina commented Jan 28, 2022

うーん?いつも同じところでコケている感じがする

image

成功する場合もあるので厄介だけど

@ishowta
Copy link
Contributor

ishowta commented May 10, 2022

indexeddbは消されないらしい cypress-io/cypress#1208

@tamaina
Copy link
Contributor

tamaina commented May 10, 2022

なんかもうCypressやめようぜ(代替としてはPlaywright?)

@syuilo
Copy link
Member Author

syuilo commented May 28, 2022

#8735 (comment)

まだたまに落ちることはありそう

@ishowta
Copy link
Contributor

ishowta commented May 28, 2022

録画を見た感じ単純にトップページの読み込みが4秒以上掛かっててタイムアウトしてるっぽい
2022-05-28_143759

widgets.js.mp4

@ishowta
Copy link
Contributor

ishowta commented May 28, 2022

マージ後の失敗は多分サインインの回数制限に引っかかっていそう…
2022-05-28_151153

https://github.com/misskey-dev/misskey/runs/6634909856?check_suite_focus=true

@syuilo
Copy link
Member Author

syuilo commented May 28, 2022

reset-db APIでRedisもリセットするようにすれば直りそう

@Johann150
Copy link
Contributor

Alternatively we may want to disable the rate limiter for tests, similar to how the reset-db API is only enabled for tests. But this we would make it impossible to create tests to check if the rate limiter actually works.

syuilo added a commit that referenced this issue Jun 3, 2022
@syuilo
Copy link
Member Author

syuilo commented Jun 16, 2022

解決で良さそう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug 🔥high priority ❓needs more investigation A bug whose causes are unknown
Projects
None yet
5 participants