flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ffbin <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2525]Add configuration support in Storm...
Date Mon, 24 Aug 2015 12:35:11 GMT
Github user ffbin commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1046#discussion_r37745758
  
    --- Diff: flink-contrib/flink-storm-compatibility/flink-storm-compatibility-core/src/test/java/org/apache/flink/stormcompatibility/wrappers/StormBoltWrapperTest.java
---
    @@ -222,6 +239,31 @@ public void testOpenSink() throws Exception {
     
     	@SuppressWarnings("unchecked")
     	@Test
    +	public void testOpenWithStormConf() throws Exception {
    +		final IRichBolt bolt = mock(IRichBolt.class);
    +		final StormBoltWrapper<Object, Object> wrapper = new StormBoltWrapper<Object,
Object>(bolt);
    +
    +		Configuration jobConfiguration = new Configuration();
    +		jobConfiguration.setString(new String("path"), new String("/home/user/file.txt"));
    +		jobConfiguration.setInteger(new String("delimitSize"), 1024);
    +		Environment env = new RuntimeEnvironment(new JobID(), new JobVertexID(), new ExecutionAttemptID(),
    +				new String(), new String(), 1, 2, jobConfiguration, mock(Configuration.class), mock(ClassLoader.class),
    +				mock(MemoryManager.class), mock(IOManager.class), mock(BroadcastVariableManager.class),
    +				mock(AccumulatorRegistry.class), mock(InputSplitProvider.class), mock(Map.class),
    +				new ResultPartitionWriter[1], new InputGate[1], mock(ActorGateway.class),
    +				mock(TaskManagerRuntimeInfo.class));
    +		StreamingRuntimeContext ctx = new StreamingRuntimeContext(env, new ExecutionConfig(),
    +				mock(KeySelector.class),
    +				mock(StateHandleProvider.class), mock(Map.class));
    +
    +		wrapper.setup(mock(Output.class), ctx);
    +		wrapper.open(mock(Configuration.class));
    +
    +		verify(bolt).prepare(any(Map.class), any(TopologyContext.class), any(OutputCollector.class));
    --- End diff --
    
    Thanks.I will check the map.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message