Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5732#discussion_r176220075
  
    --- Diff: 
flink-core/src/test/java/org/apache/flink/api/common/state/MapStateDescriptorTest.java
 ---
    @@ -129,23 +125,12 @@ public void testMapStateDescriptorAutoSerializer() 
throws Exception {
         * <p>Tests that the returned serializer is duplicated. This allows to
         * share the state descriptor.
         */
    -   @SuppressWarnings("unchecked")
        @Test
        public void testSerializerDuplication() {
    -           TypeSerializer<String> keySerializer = 
mock(TypeSerializer.class);
    -           TypeSerializer<Long> valueSerializer = 
mock(TypeSerializer.class);
    -           when(keySerializer.duplicate()).thenAnswer(new 
Answer<TypeSerializer<String>>() {
    -                   @Override
    -                   public TypeSerializer<String> answer(InvocationOnMock 
invocation) throws Throwable {
    -                           return mock(TypeSerializer.class);
    -                   }
    -           });
    -           when(valueSerializer.duplicate()).thenAnswer(new 
Answer<TypeSerializer<Long>>() {
    -                   @Override
    -                   public TypeSerializer<Long> answer(InvocationOnMock 
invocation) throws Throwable {
    -                           return mock(TypeSerializer.class);
    -                   }
    -           });
    +           // we need a serializer that actually duplicates for testing (a 
stateful one)
    --- End diff --
    
    See above


---

Reply via email to