Search in sources :

Example 1 with CompressionCodecProvider

use of org.apache.pulsar.common.compression.CompressionCodecProvider in project incubator-pulsar by apache.

the class CompressorCodecTest method testCodecProvider.

@Test(dataProvider = "codec")
void testCodecProvider(CompressionType type) throws IOException {
    CompressionCodecProvider provider = new CompressionCodecProvider();
    CompressionCodec codec1 = provider.getCodec(type);
    CompressionCodec codec2 = provider.getCodec(type);
    // A single provider instance must return the same codec instance every time
    assertTrue(codec1 == codec2);
}
Also used : CompressionCodecProvider(org.apache.pulsar.common.compression.CompressionCodecProvider) CompressionCodec(org.apache.pulsar.common.compression.CompressionCodec) Test(org.testng.annotations.Test)

Aggregations

CompressionCodec (org.apache.pulsar.common.compression.CompressionCodec)1 CompressionCodecProvider (org.apache.pulsar.common.compression.CompressionCodecProvider)1 Test (org.testng.annotations.Test)1