Search in sources :

Example 1 with RemotePartitionDeleteMetadataTransform

use of org.apache.kafka.server.log.remote.metadata.storage.serialization.RemotePartitionDeleteMetadataTransform in project kafka by apache.

the class RemoteLogMetadataTransformTest method testRemoteLogPartitionMetadataTransform.

@Test
public void testRemoteLogPartitionMetadataTransform() {
    RemotePartitionDeleteMetadataTransform transform = new RemotePartitionDeleteMetadataTransform();
    RemotePartitionDeleteMetadata partitionDeleteMetadata = new RemotePartitionDeleteMetadata(TP0, RemotePartitionDeleteState.DELETE_PARTITION_STARTED, time.milliseconds(), 1);
    ApiMessageAndVersion apiMessageAndVersion = transform.toApiMessageAndVersion(partitionDeleteMetadata);
    RemotePartitionDeleteMetadata partitionDeleteMetadataFromRecord = transform.fromApiMessageAndVersion(apiMessageAndVersion);
    Assertions.assertEquals(partitionDeleteMetadata, partitionDeleteMetadataFromRecord);
}
Also used : RemotePartitionDeleteMetadataTransform(org.apache.kafka.server.log.remote.metadata.storage.serialization.RemotePartitionDeleteMetadataTransform) ApiMessageAndVersion(org.apache.kafka.server.common.ApiMessageAndVersion) RemotePartitionDeleteMetadata(org.apache.kafka.server.log.remote.storage.RemotePartitionDeleteMetadata) Test(org.junit.jupiter.api.Test)

Aggregations

ApiMessageAndVersion (org.apache.kafka.server.common.ApiMessageAndVersion)1 RemotePartitionDeleteMetadataTransform (org.apache.kafka.server.log.remote.metadata.storage.serialization.RemotePartitionDeleteMetadataTransform)1 RemotePartitionDeleteMetadata (org.apache.kafka.server.log.remote.storage.RemotePartitionDeleteMetadata)1 Test (org.junit.jupiter.api.Test)1