kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damian...@apache.org
Subject [1/5] kafka git commit: KAFKA-5531; throw concrete exceptions in streams tests
Date Mon, 11 Sep 2017 08:42:18 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 3728f4cd9 -> c5464edbb


http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBKeyValueStoreTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBKeyValueStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBKeyValueStoreTest.java
index 51308ce..5aaf82f 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBKeyValueStoreTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBKeyValueStoreTest.java
@@ -72,12 +72,12 @@ public class RocksDBKeyValueStoreTest extends AbstractKeyValueStoreTest {
     }
 
     @Test
-    public void shouldUseCustomRocksDbConfigSetter() throws Exception {
+    public void shouldUseCustomRocksDbConfigSetter() {
         assertTrue(TheRocksDbConfigSetter.called);
     }
 
     @Test
-    public void shouldPerformRangeQueriesWithCachingDisabled() throws Exception {
+    public void shouldPerformRangeQueriesWithCachingDisabled() {
         context.setTime(1L);
         store.put(1, "hi");
         store.put(2, "goodbye");
@@ -88,7 +88,7 @@ public class RocksDBKeyValueStoreTest extends AbstractKeyValueStoreTest {
     }
 
     @Test
-    public void shouldPerformAllQueriesWithCachingDisabled() throws Exception {
+    public void shouldPerformAllQueriesWithCachingDisabled() {
         context.setTime(1L);
         store.put(1, "hi");
         store.put(2, "goodbye");
@@ -99,7 +99,7 @@ public class RocksDBKeyValueStoreTest extends AbstractKeyValueStoreTest {
     }
 
     @Test
-    public void shouldCloseOpenIteratorsWhenStoreClosedAndThrowInvalidStateStoreOnHasNextAndNext() throws Exception {
+    public void shouldCloseOpenIteratorsWhenStoreClosedAndThrowInvalidStateStoreOnHasNextAndNext() {
         context.setTime(1L);
         store.put(1, "hi");
         store.put(2, "goodbye");

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStoreTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStoreTest.java
index df91cfb..36d4c1f 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStoreTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStoreTest.java
@@ -79,7 +79,7 @@ public class RocksDBSegmentedBytesStoreTest {
     }
 
     @Test
-    public void shouldPutAndFetch() throws Exception {
+    public void shouldPutAndFetch() {
         final String key = "a";
         bytesStore.put(serializeKey(new Windowed<>(key, new SessionWindow(10, 10L))), serializeValue(10L));
         bytesStore.put(serializeKey(new Windowed<>(key, new SessionWindow(500L, 1000L))), serializeValue(50L));
@@ -94,7 +94,7 @@ public class RocksDBSegmentedBytesStoreTest {
     }
 
     @Test
-    public void shouldFindValuesWithinRange() throws Exception {
+    public void shouldFindValuesWithinRange() {
         final String key = "a";
         bytesStore.put(serializeKey(new Windowed<>(key, new SessionWindow(0L, 0L))), serializeValue(50L));
         bytesStore.put(serializeKey(new Windowed<>(key, new SessionWindow(1000L, 1000L))), serializeValue(10L));
@@ -103,7 +103,7 @@ public class RocksDBSegmentedBytesStoreTest {
     }
 
     @Test
-    public void shouldRemove() throws Exception {
+    public void shouldRemove() {
         bytesStore.put(serializeKey(new Windowed<>("a", new SessionWindow(0, 1000))), serializeValue(30L));
         bytesStore.put(serializeKey(new Windowed<>("a", new SessionWindow(1500, 2500))), serializeValue(50L));
 
@@ -113,7 +113,7 @@ public class RocksDBSegmentedBytesStoreTest {
     }
 
     @Test
-    public void shouldRollSegments() throws Exception {
+    public void shouldRollSegments() {
         // just to validate directories
         final Segments segments = new Segments(storeName, retention, numSegments);
         final String key = "a";

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreSupplierTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreSupplierTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreSupplierTest.java
index 9e41d95..f62edf8 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreSupplierTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreSupplierTest.java
@@ -72,7 +72,7 @@ public class RocksDBSessionStoreSupplierTest {
     }
 
     @Test
-    public void shouldCreateLoggingEnabledStoreWhenStoreLogged() throws Exception {
+    public void shouldCreateLoggingEnabledStoreWhenStoreLogged() {
         store = createStore(true, false);
         context.setTime(1);
         store.init(context, store);
@@ -81,7 +81,7 @@ public class RocksDBSessionStoreSupplierTest {
     }
 
     @Test
-    public void shouldNotBeLoggingEnabledStoreWhenLoggingNotEnabled() throws Exception {
+    public void shouldNotBeLoggingEnabledStoreWhenLoggingNotEnabled() {
         store = createStore(false, false);
         context.setTime(1);
         store.init(context, store);
@@ -90,7 +90,7 @@ public class RocksDBSessionStoreSupplierTest {
     }
 
     @Test
-    public void shouldReturnCachedSessionStoreWhenCachingEnabled() throws Exception {
+    public void shouldReturnCachedSessionStoreWhenCachingEnabled() {
         store = createStore(false, true);
         store.init(context, store);
         context.setTime(1);
@@ -99,9 +99,9 @@ public class RocksDBSessionStoreSupplierTest {
         assertThat(((WrappedStateStore) store).wrappedStore(), is(instanceOf(CachingSessionStore.class)));
         assertThat(cache.size(), is(2L));
     }
-    
+
     @Test
-    public void shouldHaveMeteredStoreWhenCached() throws Exception {
+    public void shouldHaveMeteredStoreWhenCached() {
         store = createStore(false, true);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();
@@ -109,7 +109,7 @@ public class RocksDBSessionStoreSupplierTest {
     }
 
     @Test
-    public void shouldHaveMeteredStoreWhenLogged() throws Exception {
+    public void shouldHaveMeteredStoreWhenLogged() {
         store = createStore(true, false);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();
@@ -117,7 +117,7 @@ public class RocksDBSessionStoreSupplierTest {
     }
 
     @Test
-    public void shouldHaveMeteredStoreWhenNotLoggedOrCached() throws Exception {
+    public void shouldHaveMeteredStoreWhenNotLoggedOrCached() {
         store = createStore(false, false);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreTest.java
index 4b4cd0c..1a452a5 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBSessionStoreTest.java
@@ -73,7 +73,7 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test
-    public void shouldPutAndFindSessionsInRange() throws Exception {
+    public void shouldPutAndFindSessionsInRange() {
         final String key = "a";
         final Windowed<String> a1 = new Windowed<>(key, new SessionWindow(10, 10L));
         final Windowed<String> a2 = new Windowed<>(key, new SessionWindow(500L, 1000L));
@@ -90,7 +90,7 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test
-    public void shouldFetchAllSessionsWithSameRecordKey() throws Exception {
+    public void shouldFetchAllSessionsWithSameRecordKey() {
 
         final List<KeyValue<Windowed<String>, Long>> expected = Arrays.asList(KeyValue.pair(new Windowed<>("a", new SessionWindow(0, 0)), 1L),
                                                                                     KeyValue.pair(new Windowed<>("a", new SessionWindow(10, 10)), 2L),
@@ -110,7 +110,7 @@ public class RocksDBSessionStoreTest {
 
 
     @Test
-    public void shouldFindValuesWithinMergingSessionWindowRange() throws Exception {
+    public void shouldFindValuesWithinMergingSessionWindowRange() {
         final String key = "a";
         sessionStore.put(new Windowed<>(key, new SessionWindow(0L, 0L)), 1L);
         sessionStore.put(new Windowed<>(key, new SessionWindow(1000L, 1000L)), 2L);
@@ -123,7 +123,7 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test
-    public void shouldRemove() throws Exception {
+    public void shouldRemove() {
         sessionStore.put(new Windowed<>("a", new SessionWindow(0, 1000)), 1L);
         sessionStore.put(new Windowed<>("a", new SessionWindow(1500, 2500)), 2L);
 
@@ -134,7 +134,7 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test
-    public void shouldFindSessionsToMerge() throws Exception {
+    public void shouldFindSessionsToMerge() {
         final Windowed<String> session1 = new Windowed<>("a", new SessionWindow(0, 100));
         final Windowed<String> session2 = new Windowed<>("a", new SessionWindow(101, 200));
         final Windowed<String> session3 = new Windowed<>("a", new SessionWindow(201, 300));
@@ -152,7 +152,7 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test
-    public void shouldFetchExactKeys() throws Exception {
+    public void shouldFetchExactKeys() {
         final RocksDBSegmentedBytesStore bytesStore =
                 new RocksDBSegmentedBytesStore("session-store", 0x7a00000000000000L, 2, new SessionKeySchema());
 
@@ -195,42 +195,42 @@ public class RocksDBSessionStoreTest {
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFindSessionsNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFindSessionsNullKey() {
         sessionStore.findSessions(null, 1L, 2L);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFindSessionsNullFromKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFindSessionsNullFromKey() {
         sessionStore.findSessions(null, "anyKeyTo", 1L, 2L);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFindSessionsNullToKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFindSessionsNullToKey() {
         sessionStore.findSessions("anyKeyFrom", null, 1L, 2L);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFetchNullFromKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFetchNullFromKey() {
         sessionStore.fetch(null, "anyToKey");
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFetchNullToKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFetchNullToKey() {
         sessionStore.fetch("anyFromKey", null);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnFetchNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnFetchNullKey() {
         sessionStore.fetch(null);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnRemoveNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnRemoveNullKey() {
         sessionStore.remove(null);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnPutNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnPutNullKey() {
         sessionStore.put(null, 1L);
     }
     

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java
index 2f93a7c..2559954 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBStoreTest.java
@@ -58,7 +58,7 @@ public class RocksDBStoreTest {
     private File dir;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         subject = new RocksDBStore<>("test", Serdes.String(), Serdes.String());
         dir = TestUtils.tempDirectory();
         context = new MockProcessorContext(dir,
@@ -69,7 +69,7 @@ public class RocksDBStoreTest {
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         subject.close();
     }
 
@@ -95,7 +95,7 @@ public class RocksDBStoreTest {
     }
 
     @Test
-    public void verifyRocksDbConfigSetterIsCalled() throws Exception {
+    public void verifyRocksDbConfigSetterIsCalled() {
         final Map<String, Object> configs = new HashMap<>();
         configs.put(StreamsConfig.APPLICATION_ID_CONFIG, "test-application");
         configs.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "test-server:9092");

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreSupplierTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreSupplierTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreSupplierTest.java
index 6ad8644..5e1f131 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreSupplierTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreSupplierTest.java
@@ -59,7 +59,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test
-    public void shouldCreateLoggingEnabledStoreWhenWindowStoreLogged() throws Exception {
+    public void shouldCreateLoggingEnabledStoreWhenWindowStoreLogged() {
         store = createStore(true, false, 3);
         final List<ProducerRecord> logged = new ArrayList<>();
         final NoOpRecordCollector collector = new NoOpRecordCollector() {
@@ -86,7 +86,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test
-    public void shouldNotBeLoggingEnabledStoreWhenLogginNotEnabled() throws Exception {
+    public void shouldNotBeLoggingEnabledStoreWhenLogginNotEnabled() {
         store = createStore(false, false, 3);
         final List<ProducerRecord> logged = new ArrayList<>();
         final NoOpRecordCollector collector = new NoOpRecordCollector() {
@@ -113,7 +113,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test
-    public void shouldBeCachedWindowStoreWhenCachingEnabled() throws Exception {
+    public void shouldBeCachedWindowStoreWhenCachingEnabled() {
         store = createStore(false, true, 3);
         store.init(context, store);
         context.setTime(1);
@@ -130,7 +130,7 @@ public class RocksDBWindowStoreSupplierTest {
         assertThat(createStore(true, false, 2), instanceOf(MeteredWindowStore.class));
     }
     @Test
-    public void shouldHaveMeteredStoreWhenCached() throws Exception {
+    public void shouldHaveMeteredStoreWhenCached() {
         store = createStore(false, true, 3);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();
@@ -138,7 +138,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test
-    public void shouldHaveMeteredStoreWhenLogged() throws Exception {
+    public void shouldHaveMeteredStoreWhenLogged() {
         store = createStore(true, false, 3);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();
@@ -146,7 +146,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test
-    public void shouldHaveMeteredStoreWhenNotLoggedOrCached() throws Exception {
+    public void shouldHaveMeteredStoreWhenNotLoggedOrCached() {
         store = createStore(false, false, 3);
         store.init(context, store);
         final StreamsMetrics metrics = context.metrics();
@@ -154,7 +154,7 @@ public class RocksDBWindowStoreSupplierTest {
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void shouldThrowIllegalArgumentExceptionIfNumSegmentsLessThanTwo() throws Exception {
+    public void shouldThrowIllegalArgumentExceptionIfNumSegmentsLessThanTwo() {
         createStore(true, true, 1);
     }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreTest.java
index acdbc74..6d13ca8 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBWindowStoreTest.java
@@ -112,7 +112,7 @@ public class RocksDBWindowStoreTest {
 
     @SuppressWarnings("unchecked")
     @Test
-    public void shouldOnlyIterateOpenSegments() throws Exception {
+    public void shouldOnlyIterateOpenSegments() {
         windowStore = createWindowStore(context, false, true);
         long currentTime = 0;
         context.setRecordContext(createRecordContext(currentTime));
@@ -640,7 +640,7 @@ public class RocksDBWindowStoreTest {
 
     @SuppressWarnings("unchecked")
     @Test
-    public void shouldCloseOpenIteratorsWhenStoreIsClosedAndThrowInvalidStateStoreExceptionOnHasNextAndNext() throws Exception {
+    public void shouldCloseOpenIteratorsWhenStoreIsClosedAndThrowInvalidStateStoreExceptionOnHasNextAndNext() {
         windowStore = createWindowStore(context, false, true);
         context.setRecordContext(createRecordContext(0));
         windowStore.put(1, "one", 1L);
@@ -667,7 +667,7 @@ public class RocksDBWindowStoreTest {
 
     @SuppressWarnings("unchecked")
     @Test
-    public void shouldFetchAndIterateOverExactKeys() throws Exception {
+    public void shouldFetchAndIterateOverExactKeys() {
         final long windowSize = 0x7a00000000000000L;
         final long retentionPeriod = 0x7a00000000000000L;
         final RocksDBWindowStoreSupplier<String, String> supplier =
@@ -710,38 +710,38 @@ public class RocksDBWindowStoreTest {
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnPutNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnPutNullKey() {
         windowStore = createWindowStore(context, false, true);
         windowStore.put(null, "anyValue");
     }
 
     @Test
-    public void shouldNotThrowNullPointerExceptionOnPutNullValue() throws Exception {
+    public void shouldNotThrowNullPointerExceptionOnPutNullValue() {
         windowStore = createWindowStore(context, false, true);
         windowStore.put(1, null);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnGetNullKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnGetNullKey() {
         windowStore = createWindowStore(context, false, true);
         windowStore.fetch(null, 1L, 2L);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnRangeNullFromKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnRangeNullFromKey() {
         windowStore = createWindowStore(context, false, true);
         windowStore.fetch(null, 2, 1L, 2L);
     }
 
     @Test(expected = NullPointerException.class)
-    public void shouldThrowNullPointerExceptionOnRangeNullToKey() throws Exception {
+    public void shouldThrowNullPointerExceptionOnRangeNullToKey() {
         windowStore = createWindowStore(context, false, true);
         windowStore.fetch(1, null, 1L, 2L);
     }
 
     @SuppressWarnings("unchecked")
     @Test
-    public void shouldFetchAndIterateOverExactBinaryKeys() throws Exception {
+    public void shouldFetchAndIterateOverExactBinaryKeys() {
         final RocksDBWindowStoreSupplier<Bytes, String> supplier =
                 new RocksDBWindowStoreSupplier<>(
                         "window",

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentIteratorTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentIteratorTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentIteratorTest.java
index e9296a2..0091e45 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentIteratorTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentIteratorTest.java
@@ -79,7 +79,7 @@ public class SegmentIteratorTest {
     }
 
     @Test
-    public void shouldIterateOverAllSegments() throws Exception {
+    public void shouldIterateOverAllSegments() {
         iterator = new SegmentIterator(Arrays.asList(segmentOne, segmentTwo).iterator(),
                 hasNextCondition,
                 Bytes.wrap("a".getBytes()),
@@ -105,7 +105,7 @@ public class SegmentIteratorTest {
     }
 
     @Test
-    public void shouldOnlyIterateOverSegmentsInRange() throws Exception {
+    public void shouldOnlyIterateOverSegmentsInRange() {
         iterator = new SegmentIterator(Arrays.asList(segmentOne, segmentTwo).iterator(),
                 hasNextCondition,
                 Bytes.wrap("a".getBytes()),
@@ -123,7 +123,7 @@ public class SegmentIteratorTest {
     }
 
     @Test(expected = NoSuchElementException.class)
-    public void shouldThrowNoSuchElementOnPeekNextKeyIfNoNext() throws Exception {
+    public void shouldThrowNoSuchElementOnPeekNextKeyIfNoNext() {
         iterator = new SegmentIterator(Arrays.asList(segmentOne, segmentTwo).iterator(),
                 hasNextCondition,
                 Bytes.wrap("f".getBytes()),
@@ -133,7 +133,7 @@ public class SegmentIteratorTest {
     }
 
     @Test(expected = NoSuchElementException.class)
-    public void shouldThrowNoSuchElementOnNextIfNoNext() throws Exception {
+    public void shouldThrowNoSuchElementOnNextIfNoNext() {
         iterator = new SegmentIterator(Arrays.asList(segmentOne, segmentTwo).iterator(),
                 hasNextCondition,
                 Bytes.wrap("f".getBytes()),

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentedCacheFunctionTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentedCacheFunctionTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentedCacheFunctionTest.java
index 7a26660..2b6d057 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentedCacheFunctionTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentedCacheFunctionTest.java
@@ -40,7 +40,7 @@ public class SegmentedCacheFunctionTest {
     private final SegmentedCacheFunction cacheFunction = new SegmentedCacheFunction(new WindowKeySchema(), SEGMENT_INTERVAL);
 
     @Test
-    public void key() throws Exception {
+    public void key() {
         assertThat(
             cacheFunction.key(THE_CACHE_KEY),
             equalTo(THE_KEY)
@@ -48,7 +48,7 @@ public class SegmentedCacheFunctionTest {
     }
 
     @Test
-    public void cacheKey() throws Exception {
+    public void cacheKey() {
         final long segmentId = TIMESTAMP / SEGMENT_INTERVAL;
 
         final Bytes actualCacheKey = cacheFunction.cacheKey(THE_KEY);
@@ -62,7 +62,7 @@ public class SegmentedCacheFunctionTest {
     }
 
     @Test
-    public void testRoundTripping() throws Exception {
+    public void testRoundTripping() {
         assertThat(
             cacheFunction.key(cacheFunction.cacheKey(THE_KEY)),
             equalTo(THE_KEY)
@@ -75,7 +75,7 @@ public class SegmentedCacheFunctionTest {
     }
 
     @Test
-    public void compareSegmentedKeys() throws Exception {
+    public void compareSegmentedKeys() {
         assertThat(
             "same key in same segment should be ranked the same",
             cacheFunction.compareSegmentedKeys(

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentsTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentsTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentsTest.java
index 9d367eb..cdaa1e0 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentsTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/SegmentsTest.java
@@ -57,7 +57,7 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldGetSegmentIdsFromTimestamp() throws Exception {
+    public void shouldGetSegmentIdsFromTimestamp() {
         assertEquals(0, segments.segmentId(0));
         assertEquals(1, segments.segmentId(60000));
         assertEquals(2, segments.segmentId(120000));
@@ -65,7 +65,7 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldBaseSegmentIntervalOnRetentionAndNumSegments() throws Exception {
+    public void shouldBaseSegmentIntervalOnRetentionAndNumSegments() {
         final Segments segments = new Segments("test", 8 * 60 * 1000, 5);
         assertEquals(0, segments.segmentId(0));
         assertEquals(0, segments.segmentId(60000));
@@ -73,14 +73,14 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldGetSegmentNameFromId() throws Exception {
+    public void shouldGetSegmentNameFromId() {
         assertEquals("test-197001010000", segments.segmentName(0));
         assertEquals("test-197001010001", segments.segmentName(1));
         assertEquals("test-197001010002", segments.segmentName(2));
     }
 
     @Test
-    public void shouldCreateSegments() throws Exception {
+    public void shouldCreateSegments() {
         final Segment segment1 = segments.getOrCreateSegment(0, context);
         final Segment segment2 = segments.getOrCreateSegment(1, context);
         final Segment segment3 = segments.getOrCreateSegment(2, context);
@@ -93,14 +93,14 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldNotCreateSegmentThatIsAlreadyExpired() throws Exception {
+    public void shouldNotCreateSegmentThatIsAlreadyExpired() {
         segments.getOrCreateSegment(7, context);
         assertNull(segments.getOrCreateSegment(0, context));
         assertFalse(new File(context.stateDir(), "test/test-197001010000").exists());
     }
 
     @Test
-    public void shouldCleanupSegmentsThatHaveExpired() throws Exception {
+    public void shouldCleanupSegmentsThatHaveExpired() {
         final Segment segment1 = segments.getOrCreateSegment(0, context);
         final Segment segment2 = segments.getOrCreateSegment(0, context);
         final Segment segment3 = segments.getOrCreateSegment(7, context);
@@ -113,14 +113,14 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldGetSegmentForTimestamp() throws Exception {
+    public void shouldGetSegmentForTimestamp() {
         final Segment segment = segments.getOrCreateSegment(0, context);
         segments.getOrCreateSegment(1, context);
         assertEquals(segment, segments.getSegmentForTimestamp(0L));
     }
 
     @Test
-    public void shouldCloseAllOpenSegments() throws Exception {
+    public void shouldCloseAllOpenSegments() {
         final Segment first = segments.getOrCreateSegment(0, context);
         final Segment second = segments.getOrCreateSegment(1, context);
         final Segment third = segments.getOrCreateSegment(2, context);
@@ -132,7 +132,7 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldOpenExistingSegments() throws Exception {
+    public void shouldOpenExistingSegments() {
         segments.getOrCreateSegment(0, context);
         segments.getOrCreateSegment(1, context);
         segments.getOrCreateSegment(2, context);
@@ -152,7 +152,7 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldGetSegmentsWithinTimeRange() throws Exception {
+    public void shouldGetSegmentsWithinTimeRange() {
         segments.getOrCreateSegment(0, context);
         segments.getOrCreateSegment(1, context);
         segments.getOrCreateSegment(2, context);
@@ -182,7 +182,7 @@ public class SegmentsTest {
     }
 
     @Test
-    public void shouldRollSegments() throws Exception {
+    public void shouldRollSegments() {
         segments.getOrCreateSegment(0, context);
         verifyCorrectSegments(0, 1);
         segments.getOrCreateSegment(1, context);

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/SerializedKeyValueIteratorTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/SerializedKeyValueIteratorTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/SerializedKeyValueIteratorTest.java
index 8d6cfda..d11b9b4 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/SerializedKeyValueIteratorTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/SerializedKeyValueIteratorTest.java
@@ -51,19 +51,19 @@ public class SerializedKeyValueIteratorTest {
     }
 
     @Test
-    public void shouldReturnNextValueWhenItExists() throws Exception {
+    public void shouldReturnNextValueWhenItExists() {
         assertThat(serializedKeyValueIterator.next(), equalTo(KeyValue.pair("hi", "there")));
         assertThat(serializedKeyValueIterator.next(), equalTo(KeyValue.pair("hello", "world")));
     }
 
     @Test
-    public void shouldReturnFalseOnHasNextWhenNoMoreResults() throws Exception {
+    public void shouldReturnFalseOnHasNextWhenNoMoreResults() {
         advanceIteratorToEnd();
         assertFalse(serializedKeyValueIterator.hasNext());
     }
 
     @Test
-    public void shouldThrowNoSuchElementOnNextWhenIteratorExhausted() throws Exception {
+    public void shouldThrowNoSuchElementOnNextWhenIteratorExhausted() {
         advanceIteratorToEnd();
         try {
             serializedKeyValueIterator.next();
@@ -74,14 +74,14 @@ public class SerializedKeyValueIteratorTest {
     }
 
     @Test
-    public void shouldPeekNextKey() throws Exception {
+    public void shouldPeekNextKey() {
         assertThat(serializedKeyValueIterator.peekNextKey(), equalTo("hi"));
         serializedKeyValueIterator.next();
         assertThat(serializedKeyValueIterator.peekNextKey(), equalTo("hello"));
     }
 
     @Test(expected = UnsupportedOperationException.class)
-    public void shouldThrowUnsupportedOperationOnRemove() throws Exception {
+    public void shouldThrowUnsupportedOperationOnRemove() {
         serializedKeyValueIterator.remove();
     }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/SessionKeySchemaTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/SessionKeySchemaTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/SessionKeySchemaTest.java
index 4682174..c3f52c9 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/SessionKeySchemaTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/SessionKeySchemaTest.java
@@ -51,14 +51,14 @@ public class SessionKeySchemaTest {
     }
 
     @Test
-    public void shouldFetchExactKeysSkippingLongerKeys() throws Exception {
+    public void shouldFetchExactKeysSkippingLongerKeys() {
         final Bytes key = Bytes.wrap(new byte[]{0});
         final List<Integer> result = getValues(sessionKeySchema.hasNextCondition(key, key, 0, Long.MAX_VALUE));
         assertThat(result, equalTo(Arrays.asList(2, 4)));
     }
 
     @Test
-    public void shouldFetchExactKeySkippingShorterKeys() throws Exception {
+    public void shouldFetchExactKeySkippingShorterKeys() {
         final Bytes key = Bytes.wrap(new byte[]{0, 0});
         final HasNextCondition hasNextCondition = sessionKeySchema.hasNextCondition(key, key, 0, Long.MAX_VALUE);
         final List<Integer> results = getValues(hasNextCondition);
@@ -66,7 +66,7 @@ public class SessionKeySchemaTest {
     }
 
     @Test
-    public void testUpperBoundWithLargeTimestamps() throws Exception {
+    public void testUpperBoundWithLargeTimestamps() {
         Bytes upper = sessionKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), Long.MAX_VALUE);
 
         assertThat(
@@ -97,7 +97,7 @@ public class SessionKeySchemaTest {
     }
 
     @Test
-    public void testUpperBoundWithKeyBytesLargerThanFirstTimestampByte() throws Exception {
+    public void testUpperBoundWithKeyBytesLargerThanFirstTimestampByte() {
         Bytes upper = sessionKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, (byte) 0x8F, (byte) 0x9F}), Long.MAX_VALUE);
 
         assertThat(
@@ -117,7 +117,7 @@ public class SessionKeySchemaTest {
     }
 
     @Test
-    public void testUpperBoundWithZeroTimestamp() throws Exception {
+    public void testUpperBoundWithZeroTimestamp() {
         Bytes upper = sessionKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), 0);
 
         assertThat(upper, equalTo(SessionKeySerde.bytesToBinary(
@@ -126,13 +126,13 @@ public class SessionKeySchemaTest {
     }
 
     @Test
-    public void testLowerBoundWithZeroTimestamp() throws Exception {
+    public void testLowerBoundWithZeroTimestamp() {
         Bytes lower = sessionKeySchema.lowerRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), 0);
         assertThat(lower, equalTo(SessionKeySerde.bytesToBinary(new Windowed<>(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), new SessionWindow(0, 0)))));
     }
 
     @Test
-    public void testLowerBoundMatchesTrailingZeros() throws Exception {
+    public void testLowerBoundMatchesTrailingZeros() {
         Bytes lower = sessionKeySchema.lowerRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), Long.MAX_VALUE);
 
         assertThat(

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/StoreChangeLoggerTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/StoreChangeLoggerTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/StoreChangeLoggerTest.java
index c2b03c0..a9f7738 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/StoreChangeLoggerTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/StoreChangeLoggerTest.java
@@ -71,7 +71,7 @@ public class StoreChangeLoggerTest {
     }
 
     @Test
-    public void testAddRemove() throws Exception {
+    public void testAddRemove() {
         context.setTime(1);
         changeLogger.logChange(0, "zero");
         changeLogger.logChange(1, "one");

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProviderTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProviderTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProviderTest.java
index fa22d7e..38b021b 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProviderTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/StreamThreadStateStoreProviderTest.java
@@ -125,7 +125,7 @@ public class StreamThreadStateStoreProviderTest {
     }
     
     @Test
-    public void shouldFindKeyValueStores() throws Exception {
+    public void shouldFindKeyValueStores() {
         mockThread(true);
         final List<ReadOnlyKeyValueStore<String, String>> kvStores =
             provider.stores("kv-store", QueryableStoreTypes.<String, String>keyValueStore());
@@ -133,7 +133,7 @@ public class StreamThreadStateStoreProviderTest {
     }
 
     @Test
-    public void shouldFindWindowStores() throws Exception {
+    public void shouldFindWindowStores() {
         mockThread(true);
         final List<ReadOnlyWindowStore<Object, Object>>
             windowStores =
@@ -142,21 +142,21 @@ public class StreamThreadStateStoreProviderTest {
     }
 
     @Test(expected = InvalidStateStoreException.class)
-    public void shouldThrowInvalidStoreExceptionIfWindowStoreClosed() throws Exception {
+    public void shouldThrowInvalidStoreExceptionIfWindowStoreClosed() {
         mockThread(true);
         taskOne.getStore("window-store").close();
         provider.stores("window-store", QueryableStoreTypes.windowStore());
     }
 
     @Test(expected = InvalidStateStoreException.class)
-    public void shouldThrowInvalidStoreExceptionIfKVStoreClosed() throws Exception {
+    public void shouldThrowInvalidStoreExceptionIfKVStoreClosed() {
         mockThread(true);
         taskOne.getStore("kv-store").close();
         provider.stores("kv-store", QueryableStoreTypes.keyValueStore());
     }
 
     @Test
-    public void shouldReturnEmptyListIfNoStoresFoundWithName() throws Exception {
+    public void shouldReturnEmptyListIfNoStoresFoundWithName() {
         mockThread(true);
         assertEquals(Collections.emptyList(), provider.stores("not-a-store", QueryableStoreTypes
             .keyValueStore()));
@@ -164,14 +164,14 @@ public class StreamThreadStateStoreProviderTest {
 
 
     @Test
-    public void shouldReturnEmptyListIfStoreExistsButIsNotOfTypeValueStore() throws Exception {
+    public void shouldReturnEmptyListIfStoreExistsButIsNotOfTypeValueStore() {
         mockThread(true);
         assertEquals(Collections.emptyList(), provider.stores("window-store",
                                                               QueryableStoreTypes.keyValueStore()));
     }
 
     @Test(expected = InvalidStateStoreException.class)
-    public void shouldThrowInvalidStoreExceptionIfNotAllStoresAvailable() throws Exception {
+    public void shouldThrowInvalidStoreExceptionIfNotAllStoresAvailable() {
         mockThread(false);
         provider.stores("kv-store", QueryableStoreTypes.keyValueStore());
     }

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
index 2c08871..ea91c79 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
@@ -181,7 +181,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldDelete() throws Exception {
+    public void shouldDelete() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final Bytes key = Bytes.wrap(new byte[]{0});
 
@@ -191,7 +191,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotFlushAfterDelete() throws Exception {
+    public void shouldNotFlushAfterDelete() {
         final Bytes key = Bytes.wrap(new byte[]{0});
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final List<ThreadCache.DirtyEntry> received = new ArrayList<>();
@@ -211,7 +211,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotBlowUpOnNonExistentKeyWhenDeleting() throws Exception {
+    public void shouldNotBlowUpOnNonExistentKeyWhenDeleting() {
         final Bytes key = Bytes.wrap(new byte[]{0});
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
 
@@ -220,13 +220,13 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotBlowUpOnNonExistentNamespaceWhenDeleting() throws Exception {
+    public void shouldNotBlowUpOnNonExistentNamespaceWhenDeleting() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         assertNull(cache.delete(namespace, Bytes.wrap(new byte[]{1})));
     }
 
     @Test
-    public void shouldNotClashWithOverlappingNames() throws Exception {
+    public void shouldNotClashWithOverlappingNames() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final Bytes nameByte = Bytes.wrap(new byte[]{0});
         final Bytes name1Byte = Bytes.wrap(new byte[]{1});
@@ -238,7 +238,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldPeekNextKey() throws Exception {
+    public void shouldPeekNextKey() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final Bytes theByte = Bytes.wrap(new byte[]{0});
         cache.put(namespace, theByte, dirtyEntry(theByte.get()));
@@ -248,7 +248,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldGetSameKeyAsPeekNext() throws Exception {
+    public void shouldGetSameKeyAsPeekNext() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final Bytes theByte = Bytes.wrap(new byte[]{0});
         cache.put(namespace, theByte, dirtyEntry(theByte.get()));
@@ -257,21 +257,21 @@ public class ThreadCacheTest {
     }
 
     @Test(expected = NoSuchElementException.class)
-    public void shouldThrowIfNoPeekNextKey() throws Exception {
+    public void shouldThrowIfNoPeekNextKey() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final ThreadCache.MemoryLRUCacheBytesIterator iterator = cache.range(namespace, Bytes.wrap(new byte[]{0}), Bytes.wrap(new byte[]{1}));
         iterator.peekNextKey();
     }
 
     @Test
-    public void shouldReturnFalseIfNoNextKey() throws Exception {
+    public void shouldReturnFalseIfNoNextKey() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final ThreadCache.MemoryLRUCacheBytesIterator iterator = cache.range(namespace, Bytes.wrap(new byte[]{0}), Bytes.wrap(new byte[]{1}));
         assertFalse(iterator.hasNext());
     }
 
     @Test
-    public void shouldPeekAndIterateOverRange() throws Exception {
+    public void shouldPeekAndIterateOverRange() {
         final ThreadCache cache = new ThreadCache("testCache", 10000L, new MockStreamsMetrics(new Metrics()));
         final byte[][] bytes = {{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}};
         for (final byte[] aByte : bytes) {
@@ -290,7 +290,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldSkipEntriesWhereValueHasBeenEvictedFromCache() throws Exception {
+    public void shouldSkipEntriesWhereValueHasBeenEvictedFromCache() {
         final int entrySize = memoryCacheEntrySize(new byte[1], new byte[1], "");
         final ThreadCache cache = new ThreadCache("testCache", entrySize * 5, new MockStreamsMetrics(new Metrics()));
         cache.addDirtyEntryFlushListener(namespace, new ThreadCache.DirtyEntryFlushListener() {
@@ -313,7 +313,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldFlushDirtyEntriesForNamespace() throws Exception {
+    public void shouldFlushDirtyEntriesForNamespace() {
         final ThreadCache cache = new ThreadCache("testCache", 100000, new MockStreamsMetrics(new Metrics()));
         final List<byte[]> received = new ArrayList<>();
         cache.addDirtyEntryFlushListener(namespace1, new ThreadCache.DirtyEntryFlushListener() {
@@ -335,7 +335,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotFlushCleanEntriesForNamespace() throws Exception {
+    public void shouldNotFlushCleanEntriesForNamespace() {
         final ThreadCache cache = new ThreadCache("testCache", 100000, new MockStreamsMetrics(new Metrics()));
         final List<byte[]> received = new ArrayList<>();
         cache.addDirtyEntryFlushListener(namespace1, new ThreadCache.DirtyEntryFlushListener() {
@@ -375,19 +375,19 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldEvictImmediatelyIfCacheSizeIsVerySmall() throws Exception {
+    public void shouldEvictImmediatelyIfCacheSizeIsVerySmall() {
         final ThreadCache cache = new ThreadCache("testCache", 1, new MockStreamsMetrics(new Metrics()));
         shouldEvictImmediatelyIfCacheSizeIsZeroOrVerySmall(cache);
     }
 
     @Test
-    public void shouldEvictImmediatelyIfCacheSizeIsZero() throws Exception {
+    public void shouldEvictImmediatelyIfCacheSizeIsZero() {
         final ThreadCache cache = new ThreadCache("testCache", 0, new MockStreamsMetrics(new Metrics()));
         shouldEvictImmediatelyIfCacheSizeIsZeroOrVerySmall(cache);
     }
 
     @Test
-    public void shouldEvictAfterPutAll() throws Exception {
+    public void shouldEvictAfterPutAll() {
         final List<ThreadCache.DirtyEntry> received = new ArrayList<>();
         final ThreadCache cache = new ThreadCache("testCache", 1, new MockStreamsMetrics(new Metrics()));
         cache.addDirtyEntryFlushListener(namespace, new ThreadCache.DirtyEntryFlushListener() {
@@ -405,7 +405,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldPutAll() throws Exception {
+    public void shouldPutAll() {
         final ThreadCache cache = new ThreadCache("testCache", 100000, new MockStreamsMetrics(new Metrics()));
 
         cache.putAll(namespace, Arrays.asList(KeyValue.pair(Bytes.wrap(new byte[]{0}), dirtyEntry(new byte[]{5})),
@@ -416,7 +416,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotForwardCleanEntryOnEviction() throws Exception {
+    public void shouldNotForwardCleanEntryOnEviction() {
         final ThreadCache cache = new ThreadCache("testCache", 0, new MockStreamsMetrics(new Metrics()));
         final List<ThreadCache.DirtyEntry> received = new ArrayList<>();
         cache.addDirtyEntryFlushListener(namespace, new ThreadCache.DirtyEntryFlushListener() {
@@ -429,7 +429,7 @@ public class ThreadCacheTest {
         assertEquals(0, received.size());
     }
     @Test
-    public void shouldPutIfAbsent() throws Exception {
+    public void shouldPutIfAbsent() {
         final ThreadCache cache = new ThreadCache("testCache", 100000, new MockStreamsMetrics(new Metrics()));
         final Bytes key = Bytes.wrap(new byte[]{10});
         final byte[] value = {30};
@@ -439,7 +439,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldEvictAfterPutIfAbsent() throws Exception {
+    public void shouldEvictAfterPutIfAbsent() {
         final List<ThreadCache.DirtyEntry> received = new ArrayList<>();
         final ThreadCache cache = new ThreadCache("testCache", 1, new MockStreamsMetrics(new Metrics()));
         cache.addDirtyEntryFlushListener(namespace, new ThreadCache.DirtyEntryFlushListener() {
@@ -458,7 +458,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldNotLoopForEverWhenEvictingAndCurrentCacheIsEmpty() throws Exception {
+    public void shouldNotLoopForEverWhenEvictingAndCurrentCacheIsEmpty() {
         final int maxCacheSizeInBytes = 100;
         final ThreadCache threadCache = new ThreadCache("testCache", maxCacheSizeInBytes, new MockStreamsMetrics(new Metrics()));
         // trigger a put into another cache on eviction from "name"
@@ -492,7 +492,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldCleanupNamedCacheOnClose() throws Exception {
+    public void shouldCleanupNamedCacheOnClose() {
         final ThreadCache cache = new ThreadCache("testCache", 100000, new MockStreamsMetrics(new Metrics()));
         cache.put(namespace1, Bytes.wrap(new byte[]{1}), cleanEntry(new byte[] {1}));
         cache.put(namespace2, Bytes.wrap(new byte[]{1}), cleanEntry(new byte[] {1}));
@@ -503,7 +503,7 @@ public class ThreadCacheTest {
     }
 
     @Test
-    public void shouldReturnNullIfKeyIsNull() throws Exception {
+    public void shouldReturnNullIfKeyIsNull() {
         final ThreadCache threadCache = new ThreadCache("testCache", 10, new MockStreamsMetrics(new Metrics()));
         threadCache.put(namespace, Bytes.wrap(new byte[]{1}), cleanEntry(new byte[] {1}));
         assertNull(threadCache.get(namespace, null));

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowKeySchemaTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowKeySchemaTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowKeySchemaTest.java
index 4a73e74..9720a9f 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowKeySchemaTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowKeySchemaTest.java
@@ -28,7 +28,7 @@ public class WindowKeySchemaTest {
     private final WindowKeySchema windowKeySchema = new WindowKeySchema();
 
     @Test
-    public void testUpperBoundWithLargeTimestamps() throws Exception {
+    public void testUpperBoundWithLargeTimestamps() {
         Bytes upper = windowKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), Long.MAX_VALUE);
 
         assertThat(
@@ -57,7 +57,7 @@ public class WindowKeySchemaTest {
     }
 
     @Test
-    public void testUpperBoundWithKeyBytesLargerThanFirstTimestampByte() throws Exception {
+    public void testUpperBoundWithKeyBytesLargerThanFirstTimestampByte() {
         Bytes upper = windowKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, (byte) 0x8F, (byte) 0x9F}), Long.MAX_VALUE);
 
         assertThat(
@@ -76,7 +76,7 @@ public class WindowKeySchemaTest {
 
 
     @Test
-    public void testUpperBoundWithKeyBytesLargerAndSmallerThanFirstTimestampByte() throws Exception {
+    public void testUpperBoundWithKeyBytesLargerAndSmallerThanFirstTimestampByte() {
         Bytes upper = windowKeySchema.upperRange(Bytes.wrap(new byte[]{0xC, 0xC, 0x9}), 0x0AffffffffffffffL);
 
         assertThat(
@@ -94,25 +94,25 @@ public class WindowKeySchemaTest {
     }
 
     @Test
-    public void testUpperBoundWithZeroTimestamp() throws Exception {
+    public void testUpperBoundWithZeroTimestamp() {
         Bytes upper = windowKeySchema.upperRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), 0);
         assertThat(upper, equalTo(WindowStoreUtils.toBinaryKey(new byte[]{0xA, 0xB, 0xC}, 0, Integer.MAX_VALUE)));
     }
 
     @Test
-    public void testLowerBoundWithZeroTimestamp() throws Exception {
+    public void testLowerBoundWithZeroTimestamp() {
         Bytes lower = windowKeySchema.lowerRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), 0);
         assertThat(lower, equalTo(WindowStoreUtils.toBinaryKey(new byte[]{0xA, 0xB, 0xC}, 0, 0)));
     }
 
     @Test
-    public void testLowerBoundWithMonZeroTimestamp() throws Exception {
+    public void testLowerBoundWithMonZeroTimestamp() {
         Bytes lower = windowKeySchema.lowerRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), 42);
         assertThat(lower, equalTo(WindowStoreUtils.toBinaryKey(new byte[]{0xA, 0xB, 0xC}, 0, 0)));
     }
 
     @Test
-    public void testLowerBoundMatchesTrailingZeros() throws Exception {
+    public void testLowerBoundMatchesTrailingZeros() {
         Bytes lower = windowKeySchema.lowerRange(Bytes.wrap(new byte[]{0xA, 0xB, 0xC}), Long.MAX_VALUE - 1);
 
         assertThat(

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowStoreUtilsTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowStoreUtilsTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowStoreUtilsTest.java
index 372acd9..91c89ec 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowStoreUtilsTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/WindowStoreUtilsTest.java
@@ -27,7 +27,7 @@ public class WindowStoreUtilsTest {
     protected StateSerdes<String, String> serdes = new StateSerdes<>("dummy", new Serdes.StringSerde(), new Serdes.StringSerde());
 
     @Test
-    public void testSerialization() throws Exception {
+    public void testSerialization() {
         final String key = "key1";
         final long timestamp = 99L;
         final int seqNum = 3;

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/state/internals/WrappingStoreProviderTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/WrappingStoreProviderTest.java b/streams/src/test/java/org/apache/kafka/streams/state/internals/WrappingStoreProviderTest.java
index 9918672..b5379d7 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/WrappingStoreProviderTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/WrappingStoreProviderTest.java
@@ -52,14 +52,14 @@ public class WrappingStoreProviderTest {
     }
 
     @Test
-    public void shouldFindKeyValueStores() throws Exception {
+    public void shouldFindKeyValueStores() {
         List<ReadOnlyKeyValueStore<String, String>> results =
                 wrappingStoreProvider.stores("kv", QueryableStoreTypes.<String, String>keyValueStore());
         assertEquals(2, results.size());
     }
 
     @Test
-    public void shouldFindWindowStores() throws Exception {
+    public void shouldFindWindowStores() {
         final List<ReadOnlyWindowStore<Object, Object>>
                 windowStores =
                 wrappingStoreProvider.stores("window", windowStore());
@@ -67,7 +67,7 @@ public class WrappingStoreProviderTest {
     }
 
     @Test(expected = InvalidStateStoreException.class)
-    public void shouldThrowInvalidStoreExceptionIfNoStoreOfTypeFound() throws Exception {
+    public void shouldThrowInvalidStoreExceptionIfNoStoreOfTypeFound() {
         wrappingStoreProvider.stores("doesn't exist", QueryableStoreTypes.keyValueStore());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/BrokerCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/BrokerCompatibilityTest.java b/streams/src/test/java/org/apache/kafka/streams/tests/BrokerCompatibilityTest.java
index d7078f9..3513895 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/BrokerCompatibilityTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/BrokerCompatibilityTest.java
@@ -43,7 +43,7 @@ public class BrokerCompatibilityTest {
     private static final String SOURCE_TOPIC = "brokerCompatibilitySourceTopic";
     private static final String SINK_TOPIC = "brokerCompatibilitySinkTopic";
 
-    public static void main(final String[] args) throws Exception {
+    public static void main(final String[] args) {
         System.out.println("StreamsTest instance started");
 
         final String kafka = args.length > 0 ? args[0] : "localhost:9092";

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java b/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
index af047a7..0c1e16b 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
@@ -58,7 +58,7 @@ public class EosTestDriver extends SmokeTestUtil {
 
     private static boolean isRunning = true;
 
-    static void generate(final String kafka) throws Exception {
+    static void generate(final String kafka) {
 
         Runtime.getRuntime().addShutdownHook(new Thread() {
             @Override

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java
index 9193d1d..9f8bcc3 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java
@@ -75,7 +75,7 @@ public class SmokeTestDriver extends SmokeTestUtil {
     }
 
     // This main() is not used by the system test. It is intended to be used for local debugging.
-    public static void main(String[] args) throws Exception {
+    public static void main(String[] args) throws InterruptedException {
         final String kafka = "localhost:9092";
         final File stateDir = TestUtils.tempDirectory();
 
@@ -129,7 +129,7 @@ public class SmokeTestDriver extends SmokeTestUtil {
         System.out.println("shutdown");
     }
 
-    public static Map<String, Set<Integer>> generate(String kafka, final int numKeys, final int maxRecordsPerKey) throws Exception {
+    public static Map<String, Set<Integer>> generate(String kafka, final int numKeys, final int maxRecordsPerKey) {
         final Properties producerProps = new Properties();
         producerProps.put(ProducerConfig.CLIENT_ID_CONFIG, "SmokeTest");
         producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, kafka);

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java
index 150ec7d..fc808e7 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java
@@ -128,7 +128,7 @@ public class SmokeTestUtil {
 
     static Serde<Double> doubleSerde = Serdes.Double();
 
-    static File createDir(final File parent, final String child) throws Exception {
+    static File createDir(final File parent, final String child) {
         final File dir = new File(parent, child);
 
         dir.mkdir();

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/StreamsEosTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/StreamsEosTest.java b/streams/src/test/java/org/apache/kafka/streams/tests/StreamsEosTest.java
index d508286..27fdc2d 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/StreamsEosTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/StreamsEosTest.java
@@ -24,7 +24,7 @@ public class StreamsEosTest {
      *  args ::= command kafka zookeeper stateDir
      *  command := "run" | "process" | "verify"
      */
-    public static void main(final String[] args) throws Exception {
+    public static void main(final String[] args) {
         final String kafka = args[0];
         final String stateDir = args.length > 1 ? args[1] : null;
         final String command = args.length > 2 ? args[2] : null;

http://git-wip-us.apache.org/repos/asf/kafka/blob/c5464edb/streams/src/test/java/org/apache/kafka/streams/tests/StreamsSmokeTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/StreamsSmokeTest.java b/streams/src/test/java/org/apache/kafka/streams/tests/StreamsSmokeTest.java
index 244aa8e..64597bd 100644
--- a/streams/src/test/java/org/apache/kafka/streams/tests/StreamsSmokeTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/tests/StreamsSmokeTest.java
@@ -28,7 +28,7 @@ public class StreamsSmokeTest {
      *
      * @param args
      */
-    public static void main(String[] args) throws Exception {
+    public static void main(String[] args) throws InterruptedException {
         String kafka = args[0];
         String stateDir = args.length > 1 ? args[1] : null;
         String command = args.length > 2 ? args[2] : null;


Mime
View raw message