codecrafters-io / build-your-own-redis

Definition for the redis challenge.
https://app.codecrafters.io/courses/redis/overview
MIT License
133 stars 40 forks source link

Question on tests "Receive handshake (2/2)" #269

Open HongtaoYang opened 3 hours ago

HongtaoYang commented 3 hours ago

When I run the test, this stage will fail about half the time at random.

After enabling debug mode, I saw this message:

[tester::#ZN8] [handshake] replica: Received bytes: "+FULLRESYNC 6zhEkGRqJSXte731000wMocCPVY-vf731wgEkaBO 0\r\n"                    │
[tester::#ZN8] [handshake] replica: Received RESP simple string: "FULLRESYNC 6zhEkGRqJSXte731000wMocCPVY-vf731wgEkaBO 0"            │
[tester::#ZN8] Expected "FULLRESYNC 6zhEkGRqJSXte731000wMocCPVY-vf731wgEkaBO 0" to match the pattern "FULLRESYNC \\w+ 0".           │
[tester::#ZN8] Test failed 

Based on this debug info, it seems that the tests failed because there is a "-" in the id. Should we allow "-" or "_" in the id? Or is the id strictly alphanumeric?

linear[bot] commented 3 hours ago

CC-1474 Unstable tests on "Receive handshake (2/2)"