add small config test for ignoreUnexpectedChildShards
This commit is contained in:
parent
32e8187261
commit
044fb3a652
1 changed files with 11 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ package com.amazonaws.services.kinesis.clientlibrary.lib.worker;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -407,4 +408,14 @@ public class KinesisClientLibConfigurationTest {
|
|||
fail("Should not have thrown");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testKCLConfigurationWithIgnoreUnexpectedChildShards() {
|
||||
KinesisClientLibConfiguration config =
|
||||
new KinesisClientLibConfiguration("TestApplication", "TestStream", null, "TestWorker");
|
||||
// By default, unexpected child shards should not be ignored.
|
||||
assertFalse(config.shouldIgnoreUnexpectedChildShards());
|
||||
config = config.withIgnoreUnexpectedChildShards(true);
|
||||
assertTrue(config.shouldIgnoreUnexpectedChildShards());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue