Skip to content

Commit 6265440

Browse files
committed
rename the context and streamsConfig
Local variables should not shadow class fields
1 parent 181091c commit 6265440

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

streams/src/test/java/org/apache/kafka/streams/state/internals/ChangeLoggingKeyValueBytesStoreTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ public void after() {
112112

113113
@Test
114114
void shouldDelegateInit() {
115-
final InternalMockProcessorContext context = mockContext();
115+
final InternalMockProcessorContext mockContext = mockContext();
116116
final KeyValueStore<Bytes, byte[]> innerMock = mock(InMemoryKeyValueStore.class);
117117
final StateStore outer = new ChangeLoggingKeyValueBytesStore(innerMock);
118-
outer.init(context, outer);
119-
verify(innerMock).init(context, outer);
118+
outer.init(mockContext, outer);
119+
verify(innerMock).init(mockContext, outer);
120120
}
121121

122122
@Test
@@ -264,13 +264,13 @@ void shouldLogPositionOnPut() {
264264
}
265265

266266
private StreamsConfig streamsConfigMock() {
267-
final StreamsConfig streamsConfig = mock(StreamsConfig.class);
267+
final StreamsConfig mockedStreamsConfig = mock(StreamsConfig.class);
268268

269269
final Map<String, Object> myValues = new HashMap<>();
270270
myValues.put(InternalConfig.IQ_CONSISTENCY_OFFSET_VECTOR_ENABLED, true);
271-
when(streamsConfig.originals()).thenReturn(myValues);
272-
when(streamsConfig.values()).thenReturn(Collections.emptyMap());
273-
when(streamsConfig.getString(StreamsConfig.APPLICATION_ID_CONFIG)).thenReturn("add-id");
274-
return streamsConfig;
271+
when(mockedStreamsConfig.originals()).thenReturn(myValues);
272+
when(mockedStreamsConfig.values()).thenReturn(Collections.emptyMap());
273+
when(mockedStreamsConfig.getString(StreamsConfig.APPLICATION_ID_CONFIG)).thenReturn("add-id");
274+
return mockedStreamsConfig;
275275
}
276276
}

0 commit comments

Comments
 (0)