yorkie-team/yorkie

Admin RPC test fails intermittently

hackerwins opened this issue · 2 comments

What happened:

Admin RPC test fails intermittently. It is recommended to eliminate the cause of failure as it can slow down the overall development speed.

2023-06-08T00:18:11.043Z	INFO	r51	RPC : "/yorkie.v1.AdminService/LogIn" 1.659827433s
    server_test.go:738: 
        	Error Trace:	/home/runner/work/yorkie/yorkie/server/rpc/server_test.go:738
        	Error:      	Not equal: 
        	            	expected: 0x10
        	            	actual  : 0xe
        	Test:       	TestAdminRPCServerBackend/admin_login_test

https://github.com/yorkie-team/yorkie/actions/runs/5205976019/jobs/9392020898#step:10:550

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Operating system:
  • Browser and version:
  • Yorkie version (use yorkie version):
  • Yorkie JS SDK version:
krapie commented

I'm currently investigating the cause of this problem, and I will comment when I have an update on this issue.

krapie commented

I'm struggling with this issue since I cannot reproduce this issue...
But, I have found one possible cause of this issue, which is gRPC MaxConnectionAge.

Because MaxConnectionAge is set to few seconds for tests, if admin rpc login test takes longer than MaxConnectionAge, it will fail with gRPC Unavailable code.

I have looked for failed admin RPC login tests, and found out that all the failed tests took 2 ~ 3 seconds, whereas passed admin RPC login tests took 1 ~ 2 seconds.