Skip to content

Commit

Permalink
[Functions] The argument and description for dead letter topic is wro…
Browse files Browse the repository at this point in the history
…ng (apache#6101)

*Motivation*

Related to apache#6084

 apache#5400 introduces `customRuntimeOptions` in function details. But the description was wrong. The mistake was probably introduced by bad merges.

*Modification*

Fix the argument and description for `deadletterTopic` and `customRuntimeOptions`.
  • Loading branch information
sijie authored and codelipenghui committed Jan 21, 2020
1 parent 055f3bb commit c6e258d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,17 @@ public void testCreateFunction() throws Exception {
"--tenant", "sample",
"--namespace", "ns1",
"--className", DummyFunction.class.getName(),
"--dead-letter-topic", "test-dead-letter-topic",
"--custom-runtime-options", "custom-runtime-options"
});

CreateFunction creater = cmd.getCreater();
assertEquals(fnName, creater.getFunctionName());
assertEquals(inputTopicName, creater.getInputs());
assertEquals(outputTopicName, creater.getOutput());
assertEquals(new Boolean(false), creater.getAutoAck());
assertEquals("test-dead-letter-topic", creater.getDeadLetterTopic());
assertEquals("custom-runtime-options", creater.getCustomRuntimeOptions());

verify(functions, times(1)).createFunction(any(FunctionConfig.class), anyString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ abstract class FunctionDetailsCommand extends BaseCommand {
protected Long timeoutMs;
@Parameter(names = "--max-message-retries", description = "How many times should we try to process a message before giving up")
protected Integer maxMessageRetries;
@Parameter(names = "--dead-letter-topic", description = "The topic where messages that are not processed successfully are sent to")
protected String customRuntimeOptions;
@Parameter(names = "--custom-runtime-options", description = "A string that encodes options to customize the runtime, see docs for configured runtime for details")
protected String customRuntimeOptions;
@Parameter(names = "--dead-letter-topic", description = "The topic where messages that are not processed successfully are sent to")
protected String deadLetterTopic;
protected FunctionConfig functionConfig;
protected String userCodeFile;
Expand Down

0 comments on commit c6e258d

Please sign in to comment.