removed spacing and removed unit test assertion on exception message
This commit is contained in:
parent
e11cc9a398
commit
c5d16d2c96
1 changed files with 8 additions and 9 deletions
|
|
@ -107,8 +107,8 @@ public class KinesisClientLibConfiguratorTest {
|
||||||
// they must specify the time with initialPositionInStreamExtended.
|
// they must specify the time with initialPositionInStreamExtended.
|
||||||
try {
|
try {
|
||||||
getConfiguration(StringUtils.join(new String[] { "applicationName = app",
|
getConfiguration(StringUtils.join(new String[] { "applicationName = app",
|
||||||
"streamName = 123", "AWSCredentialsProvider = " + credentialName1 + ", " + credentialName2,
|
"streamName = 123", "AWSCredentialsProvider = " + credentialName1 + ", " + credentialName2,
|
||||||
"initialPositionInStream = AT_TIMESTAMP"}, '\n'));
|
"initialPositionInStream = AT_TIMESTAMP"}, '\n'));
|
||||||
fail("Should have thrown when initialPositionInStream is set to AT_TIMESTAMP");
|
fail("Should have thrown when initialPositionInStream is set to AT_TIMESTAMP");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Throwable rootCause = ExceptionUtils.getRootCause(e);
|
Throwable rootCause = ExceptionUtils.getRootCause(e);
|
||||||
|
|
@ -122,8 +122,8 @@ public class KinesisClientLibConfiguratorTest {
|
||||||
// value is provided, the constructor should throw an IllegalArgumentException exception.
|
// value is provided, the constructor should throw an IllegalArgumentException exception.
|
||||||
try {
|
try {
|
||||||
getConfiguration(StringUtils.join(new String[] { "applicationName = app",
|
getConfiguration(StringUtils.join(new String[] { "applicationName = app",
|
||||||
"streamName = 123", "AWSCredentialsProvider = " + credentialName1 + ", " + credentialName2,
|
"streamName = 123", "AWSCredentialsProvider = " + credentialName1 + ", " + credentialName2,
|
||||||
"initialPositionInStreamExtended = null"}, '\n'));
|
"initialPositionInStreamExtended = null"}, '\n'));
|
||||||
fail("Should have thrown when initialPositionInStreamExtended is set to null");
|
fail("Should have thrown when initialPositionInStreamExtended is set to null");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Throwable rootCause = ExceptionUtils.getRootCause(e);
|
Throwable rootCause = ExceptionUtils.getRootCause(e);
|
||||||
|
|
@ -163,9 +163,9 @@ public class KinesisClientLibConfiguratorTest {
|
||||||
@Test
|
@Test
|
||||||
public void testWithBooleanVariables() {
|
public void testWithBooleanVariables() {
|
||||||
MultiLangDaemonConfiguration config = getConfiguration(StringUtils.join(new String[] { "streamName = a",
|
MultiLangDaemonConfiguration config = getConfiguration(StringUtils.join(new String[] { "streamName = a",
|
||||||
"applicationName = b", "AWSCredentialsProvider = ABCD, " + credentialName1, "workerId = 0",
|
"applicationName = b", "AWSCredentialsProvider = ABCD, " + credentialName1, "workerId = 0",
|
||||||
"cleanupLeasesUponShardCompletion = false", "validateSequenceNumberBeforeCheckpointing = true",
|
"cleanupLeasesUponShardCompletion = false", "validateSequenceNumberBeforeCheckpointing = true",
|
||||||
"regionName = us-east-1"},
|
"regionName = us-east-1"},
|
||||||
'\n'));
|
'\n'));
|
||||||
|
|
||||||
assertEquals(config.getApplicationName(), "b");
|
assertEquals(config.getApplicationName(), "b");
|
||||||
|
|
@ -309,7 +309,6 @@ public class KinesisClientLibConfiguratorTest {
|
||||||
@Test
|
@Test
|
||||||
public void testWithMissingStreamNameAndMissingStreamArn() {
|
public void testWithMissingStreamNameAndMissingStreamArn() {
|
||||||
thrown.expect(NullPointerException.class);
|
thrown.expect(NullPointerException.class);
|
||||||
thrown.expectMessage("Stream name or Stream Arn is required. Stream Arn takes precedence if both are passed in.");
|
|
||||||
|
|
||||||
String test = StringUtils.join(new String[] {
|
String test = StringUtils.join(new String[] {
|
||||||
"applicationName = b",
|
"applicationName = b",
|
||||||
|
|
@ -321,10 +320,10 @@ public class KinesisClientLibConfiguratorTest {
|
||||||
|
|
||||||
configurator.getConfiguration(input);
|
configurator.getConfiguration(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWithEmptyStreamNameAndMissingStreamArn() {
|
public void testWithEmptyStreamNameAndMissingStreamArn() {
|
||||||
thrown.expect(IllegalArgumentException.class);
|
thrown.expect(IllegalArgumentException.class);
|
||||||
thrown.expectMessage("Stream name or Stream Arn is required. Stream Arn takes precedence if both are passed in.");
|
|
||||||
|
|
||||||
String test = StringUtils.join(new String[] {
|
String test = StringUtils.join(new String[] {
|
||||||
"applicationName = b",
|
"applicationName = b",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue