StefanRRichter commented on a change in pull request #7061: [FLINK-10827][tests] Add test for duplicate() to SerializerTestBase URL: https://github.com/apache/flink/pull/7061#discussion_r232572989
########## File path: flink-core/src/test/java/org/apache/flink/api/common/typeutils/SerializerTestBase.java ########## @@ -436,6 +441,36 @@ public void testNullability() { } } + @Test + public void testDuplicate() throws Exception { + final int numThreads = 10; + final TypeSerializer<T> serializer = getSerializer(); + final OneShotLatch startLatch = new OneShotLatch(); + final List<SerializerRunner<T>> concurrentRunners = new ArrayList<>(numThreads); + Assert.assertEquals(serializer, serializer.duplicate()); + + T[] testData = getData(); + final int testDataIterations = Math.max(1, 250 / testData.length); + + for (int i = 0; i < numThreads; ++i) { + SerializerRunner<T> runner = new SerializerRunner<>( + startLatch, Review comment: What would be the benefit? This feels like it does exactly what we want. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services