hortonworks / registry

Schema Registry
Apache License 2.0
15 stars 8 forks source link

SchemaVersionProtocolHandlerTest is flaky #776

Closed acsaki closed 1 year ago

acsaki commented 1 year ago

AvroSnapshotSerializer's protocol version validation is flawed:
The testSerDesProtocolVersionAsMoreThan127 is working most of the time, because there are just 6 serdes protocol handlers, and the SerDesProtocolHandlerRegistry.get().getSerDesProtocolHandler(protocolVersion)throws an Avro exception. (There is a 6/256 chance that test won't pass, for example if nexInt is 0) The provided Number (that is larger than 127, and sometimes smaller bacause of the overflow, is internally casted to a byte)