flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/state/SerializationProxiesTest.java
/**
	 * This test fixes the order of elements in the enum which is important for serialization. Do not modify this test
	 * except if you are entirely sure what you are doing.
	 */
This test fixes the order of elements in the enum which is important for serialization. Do not modify this test
except if you are entirely sure what you are doing.
This test fixes the order of elements in the enum which is important for serialization . Do not modify this test except if you are entirely sure what you are doing .
@Test
	public void testFixTypeOrder() {
		Assert.assertEquals(7, StateDescriptor.Type.values().length);
		Assert.assertEquals(0, StateDescriptor.Type.UNKNOWN.ordinal());
		Assert.assertEquals(1, StateDescriptor.Type.VALUE.ordinal());
		Assert.assertEquals(2, StateDescriptor.Type.LIST.ordinal());
		Assert.assertEquals(3, StateDescriptor.Type.REDUCING.ordinal());
		Assert.assertEquals(4, StateDescriptor.Type.FOLDING.ordinal());
		Assert.assertEquals(5, StateDescriptor.Type.AGGREGATING.ordinal());
		Assert.assertEquals(6, StateDescriptor.Type.MAP.ordinal());
	}
@ Test public void testFixTypeOrder ( ) { Assert . assertEquals ( 7 , StateDescriptor . Type . values ( ) . length ) ; Assert . assertEquals ( 0 , StateDescriptor . Type . UNKNOWN . ordinal ( ) ) ; Assert . assertEquals ( 1 , StateDescriptor . Type . VALUE . ordinal ( ) ) ; Assert . assertEquals ( 2 , StateDescriptor . Type . LIST . ordinal ( ) ) ; Assert . assertEquals ( 3 , StateDescriptor . Type . REDUCING . ordinal ( ) ) ; Assert . assertEquals ( 4 , StateDescriptor . Type . FOLDING . ordinal ( ) ) ; Assert . assertEquals ( 5 , StateDescriptor . Type . AGGREGATING . ordinal ( ) ) ; Assert . assertEquals ( 6 , StateDescriptor . Type . MAP . ordinal ( ) ) ; }
This test fixes the order of elements in the enum which is important for serialization.
This test fixes the order of elements in the enum which is important for serialization .
// ensure all elements are covered // fix the order of elements to keep serialization format stable