Tests start failing with "Expected element #1 to be a bulk string, got simple string"

Hi codecrafters

From today redis tests start failing with message “Expected element #1 to be a bulk string, got simple string“. Right now im on sorted set challenge - but from today it’s started to fail on very early stages like - set/get or List elements (positive indexes) . Just tried to fix em - but looks like need to fix all tests chain. Is it related to new challege - do not know ) Just sample from me

[tester::#SF6] Running tests for Stage #SF6 (Lists - List elements (positive indexes))
[tester::#SF6] $ ./your_program.sh
[your_program] Args { port: 6379, replicaof: None, dir: None, dbfilename: None }
[tester::#SF6] [client] $ redis-cli RPUSH blueberry orange pear apple blueberry raspberry mango
[tester::#SF6] [client] Sent bytes: "*8\r\n$5\r\nRPUSH\r\n$9\r\nblueberry\r\n$6\r\norange\r\n$4\r\npear\r\n$5\r\napple\r\n$9\r\nblueberry\r\n$9\r\nraspberry\r\n$5\r\nmango\r\n"
[your_program] Decoded +++++ ["RPUSH", "blueberry", "orange", "pear", "apple", "blueberry", "raspberry", "mango"]
[your_program] Handling RPush("blueberry", ["orange", "pear", "apple", "blueberry", "raspberry", "mango"])
[your_program] Adding to list: ["orange", "pear", "apple", "blueberry", "raspberry", "mango"]
[your_program] Done sending notification
[tester::#SF6] [client] Received bytes: ":6\r\n"
[tester::#SF6] [client] Received RESP integer: 6
[tester::#SF6] [client] ✔︎ Received 6
[tester::#SF6] [client] > LRANGE blueberry 0 3
[tester::#SF6] [client] Sent bytes: "*4\r\n$6\r\nLRANGE\r\n$9\r\nblueberry\r\n$1\r\n0\r\n$1\r\n3\r\n"
[tester::#SF6] [client] Received bytes: "*4\r\n+orange\r\n+pear\r\n+apple\r\n+blueberry\r\n"
[tester::#SF6] [client] Received RESP array: [
[tester::#SF6] [client]   "orange",
[tester::#SF6] [client]   "pear",
[tester::#SF6] [client]   "apple",
[tester::#SF6] [client]   "blueberry"
[tester::#SF6] [client] ]
[tester::#SF6] Expected element #1 to be a bulk string, got simple string
[tester::#SF6] Test failed
[tester::#SF6] Terminating program

Hey @Evilsunz, sorry for the confusion here.

We recently updated the Redis tester to strictly enforce the expected data types (bulk string vs simple string), which is likely why you’re seeing those failures now.

Previously, the tester was more lenient, but it’s now aligned with the Redis protocol spec. Let us know if you need help updating your implementation!

Thanks for explanations - i had some concerns about to fix this String → Bulk and then need to rollback in case this was some error in Redis tester.

1 Like