Kinetica   C#   API  Version 7.2.3.1
Kinetica.Tests.UnitTests.ProtocolWireFormatTests Class Reference

Protocol-level wire-format tests for Kinetica binary protocol. More...

Public Member Functions

void RecordKey_IntegerShardKey_ProducesStableEncoding ()
 Tests that RecordKey encoding for integers produces consistent byte patterns. More...
 
void RecordKey_StringShardKey_ProducesStableEncoding ()
 Tests RecordKey encoding for strings (charN routing columns). More...
 
void RecordKey_LongShardKey_ProducesStableEncoding ()
 Tests RecordKey encoding for long values. More...
 
void RecordKey_Decimal8Byte_StableWireFormat ()
 Regression test: Decimal encoding with precision <= 18 (8-byte format). More...
 
void RecordKey_Decimal12Byte_StableWireFormat ()
 Regression test: Decimal encoding with precision > 18 (12-byte format). More...
 
void KineticaType_SimpleSchema_ProducesStableSchemaString ()
 Tests that KineticaType schema strings remain stable. More...
 
void KineticaType_NullableField_UsesConsistentUnionSchema ()
 Tests that nullable field schemas use consistent union encoding. More...
 
void ColumnProperties_ShardKeyProperty_EncodesConsistently ()
 Tests that column properties are encoded consistently. More...
 
void Compression_Snappy_RoundTripsCorrectly ()
 Tests that data compression produces deterministic output (when supported). More...
 
void EmptyRecord_EncodesConsistently ()
 Regression test: Verify that empty Avro records encode consistently. More...
 
void RecordKey_CompositeKey_MaintainsFieldOrder ()
 Regression test: Multi-field RecordKey stability. More...
 

Detailed Description

Protocol-level wire-format tests for Kinetica binary protocol.

These tests verify the complete request/response encoding at the protocol level, including JSON serialization, Avro encoding, and compression.

Purpose:

  • Ensure backward compatibility with server protocol versions
  • Detect unintended changes to request/response format
  • Provide regression test vectors for critical operations

Note: These tests use pinned byte arrays (golden files) to detect any changes in the wire format that could break compatibility.

Definition at line 24 of file ProtocolWireFormatTests.cs.

Member Function Documentation

◆ ColumnProperties_ShardKeyProperty_EncodesConsistently()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.ColumnProperties_ShardKeyProperty_EncodesConsistently ( )
inline

Tests that column properties are encoded consistently.

Properties like shard_key, primary_key must remain stable.

Definition at line 230 of file ProtocolWireFormatTests.cs.

◆ Compression_Snappy_RoundTripsCorrectly()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.Compression_Snappy_RoundTripsCorrectly ( )
inline

Tests that data compression produces deterministic output (when supported).

Note: Snappy compression may not be fully deterministic, so we test that compression/decompression round-trips correctly.

Definition at line 251 of file ProtocolWireFormatTests.cs.

◆ EmptyRecord_EncodesConsistently()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.EmptyRecord_EncodesConsistently ( )
inline

Regression test: Verify that empty Avro records encode consistently.

Skipped because KineticaType intentionally does not support empty schemas.

Definition at line 280 of file ProtocolWireFormatTests.cs.

◆ KineticaType_NullableField_UsesConsistentUnionSchema()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.KineticaType_NullableField_UsesConsistentUnionSchema ( )
inline

Tests that nullable field schemas use consistent union encoding.

Definition at line 201 of file ProtocolWireFormatTests.cs.

◆ KineticaType_SimpleSchema_ProducesStableSchemaString()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.KineticaType_SimpleSchema_ProducesStableSchemaString ( )
inline

Tests that KineticaType schema strings remain stable.

Schema changes can break compatibility with existing tables.

Definition at line 172 of file ProtocolWireFormatTests.cs.

◆ RecordKey_CompositeKey_MaintainsFieldOrder()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_CompositeKey_MaintainsFieldOrder ( )
inline

Regression test: Multi-field RecordKey stability.

Composite shard keys must maintain field order.

Definition at line 306 of file ProtocolWireFormatTests.cs.

◆ RecordKey_Decimal12Byte_StableWireFormat()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_Decimal12Byte_StableWireFormat ( )
inline

Regression test: Decimal encoding with precision > 18 (12-byte format).

Definition at line 135 of file ProtocolWireFormatTests.cs.

◆ RecordKey_Decimal8Byte_StableWireFormat()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_Decimal8Byte_StableWireFormat ( )
inline

Regression test: Decimal encoding with precision <= 18 (8-byte format).

This is a critical wire format that must remain stable for shard routing.

Definition at line 108 of file ProtocolWireFormatTests.cs.

◆ RecordKey_IntegerShardKey_ProducesStableEncoding()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_IntegerShardKey_ProducesStableEncoding ( )
inline

Tests that RecordKey encoding for integers produces consistent byte patterns.

RecordKeys are used for shard routing and must remain stable across versions.

Definition at line 33 of file ProtocolWireFormatTests.cs.

◆ RecordKey_LongShardKey_ProducesStableEncoding()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_LongShardKey_ProducesStableEncoding ( )
inline

Tests RecordKey encoding for long values.

Definition at line 83 of file ProtocolWireFormatTests.cs.

◆ RecordKey_StringShardKey_ProducesStableEncoding()

void Kinetica.Tests.UnitTests.ProtocolWireFormatTests.RecordKey_StringShardKey_ProducesStableEncoding ( )
inline

Tests RecordKey encoding for strings (charN routing columns).

String keys must be UTF-8 encoded and null-padded.

Definition at line 59 of file ProtocolWireFormatTests.cs.


The documentation for this class was generated from the following file: