Parse API Version #nc5 | test issue

Parse API Version #nc5

For this stage test are written wrong

Example:
binary.BigEndian.Uint16(buf[4:8])
if i parse this, it also passed the test
Ideally this should not be the scenario
its strictly like this, binary.BigEndian.Uint16(buf[2:4])

check this image
in buf2 output: buf[4:8] is [0 18 0 4]
if I parse this should fail right
But its pased

So correct scenario is [0 35] because request_api_key => INT16
buf[2:4]
So Please add strictly pass here

Its very confusing to understand if very test is passed, So what is the point for test.

If I’m doing something wrong Please correct me

@rmgist Thanks for highlighting the issue! We’re looking into how to improve the tester right now, and will keep you updated on any changes.


BTW, neither buf[2:4] nor buf[4:8] is the correct API Version field.

  • buf[2:4] is part of the message size.
  • The correct place is buf[6:8]:


Feel free to use BinSpec to explore the APIVersions request.

ok thank you
https://binspec.ccio.dev/kafka-api-versions-request-v4?highlight=4-23
this resource is really nice

1 Like

The changes required here turned out to be non-trivial – we’ll need to make a backward-incompatible change to make this work. Going to avoid for now, will revive once we have the platform feature to make backward-incompatible changes!