flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bowenli86 <...@git.apache.org>
Subject [GitHub] flink pull request #5032: [FLINK-8090] [DataStream] Improve the error messag...
Date Wed, 22 Nov 2017 06:00:22 GMT
Github user bowenli86 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5032#discussion_r152475532
  
    --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/StreamingRuntimeContextTest.java
---
    @@ -270,6 +271,20 @@ public void testMapStateReturnsEmptyMapByDefault() throws Exception
{
     		assertFalse(value.iterator().hasNext());
     	}
     
    +	@Test(expected = DuplicateStateNameException.class)
    +	public void testDuplicateStateName() throws Exception {
    +		StreamingRuntimeContext context = new StreamingRuntimeContext(
    +				createMapPlainMockOp(),
    +				createMockEnvironment(),
    +				Collections.emptyMap());
    +		MapStateDescriptor<Integer, String> mapStateDesc =
    +				new MapStateDescriptor<>("name", Integer.class, String.class);
    +		ListStateDescriptor<String> listStateDesc =
    +				new ListStateDescriptor<>("name", String.class);
    +		context.getMapState(mapStateDesc);
    --- End diff --
    
    This is good enough 👍 


---

Mime
View raw message