use of com.palantir.atlasdb.schema.stream.generated.StreamTestWithHashStreamMetadataTable.StreamTestWithHashStreamMetadataRow in project atlasdb by palantir.
the class StreamTest method getStreamMetadata.
private StreamMetadata getStreamMetadata(long id) {
return txManager.runTaskReadOnly(t -> {
StreamTestWithHashStreamMetadataTable table = StreamTestTableFactory.of().getStreamTestWithHashStreamMetadataTable(t);
StreamTestWithHashStreamMetadataRow row = StreamTestWithHashStreamMetadataRow.of(id);
return table.getRow(row).get().getMetadata();
});
}
use of com.palantir.atlasdb.schema.stream.generated.StreamTestWithHashStreamMetadataTable.StreamTestWithHashStreamMetadataRow in project atlasdb by palantir.
the class StreamTest method testStreamStoreWithHashMetadataRowPersistToBytesAndHydrateSucceeds.
@Test
public void testStreamStoreWithHashMetadataRowPersistToBytesAndHydrateSucceeds() {
StreamTestWithHashStreamMetadataRow row = StreamTestWithHashStreamMetadataRow.of(5L);
byte[] persistedRow = row.persistToBytes();
StreamTestWithHashStreamMetadataRow hydratedRow = StreamTestWithHashStreamMetadataRow.BYTES_HYDRATOR.hydrateFromBytes(persistedRow);
assertEquals(row, hydratedRow);
}
Aggregations