-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Multilang Daemon to support StreamArn #1143
Conversation
…so updated unit tests to be more explicit with the expected exceptions
…re consistent with other error messages
...ang/src/main/java/software/amazon/kinesis/multilang/config/MultiLangDaemonConfiguration.java
Outdated
Show resolved
Hide resolved
… as well). Also updated unit tests and added Region validation
…r than individual section
… support in multilangdaemon
...ang/src/main/java/software/amazon/kinesis/multilang/config/KinesisClientLibConfigurator.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
@Test(expected = IllegalArgumentException.class) | ||
public void testConstructorFailsBecauseStreamArnIsInvalid2() throws Exception { | ||
setup("", "arn:aws:kinesis:us-east-2:ACCOUNT_ID:BadFormatting:stream/" + TEST_STREAM_NAME_IN_ARN, TEST_REGION); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Parameterized
would eliminate boilerplate for these similar tests.
No change needed.
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...ent-multilang/src/test/java/software/amazon/kinesis/multilang/MultiLangDaemonConfigTest.java
Outdated
Show resolved
Hide resolved
...src/test/java/software/amazon/kinesis/multilang/config/KinesisClientLibConfiguratorTest.java
Show resolved
Hide resolved
… conventions and simplied kinesisClientLibConfiguration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Recommend enhancing the KinesisClientLibConfigurator
to clearly communicate when the Cx-provided configuration stomps on its own stream name.
|
||
} | ||
|
||
Validate.notBlank(configuration.getStreamName(), "Stream name or Stream Arn is required. Stream Arn takes precedence if both are passed in."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for attempt at signaling "Stream Arn takes precedence ..."
However, this validation message only surfaces if the stream name is blank. Perhaps there should be a log.warn(...)
-- circa ~79, before configuration.setStreamName(...)
-- that warns of the name-stomping if-and-only-if a provided stream name is about to be overridden by the stream from the ARN.
assertNotNull(deamonConfig.getRecordProcessorFactory()); | ||
|
||
assertEquals(EXE, deamonConfig.getRecordProcessorFactory().getCommandArray()[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we only interested in the 0th element (and if so, why?), or should this compare the full array? Example:
assertEquals(new String[] { EXE }, dC.getRPF().getCA());
*Extension of PR 1141 - Moved from branch to fork
Description of changes:
==========================================================================================
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.