Skip to content

Commit e32efea

Browse files
committed
refactor: remove public modifier in the test code
Signed-off-by: Chaedong Im <[email protected]>
1 parent 47a728f commit e32efea

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

spring-kafka/src/test/java/org/springframework/kafka/listener/AckModeRecordFilteredTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
* @author Chaedong Im
5151
* @see AckModeRecordWithFilteringTest
5252
*/
53-
public class AckModeRecordFilteredTest {
53+
class AckModeRecordFilteredTest {
5454

5555
@SuppressWarnings({"unchecked", "deprecation"})
5656
@Test
57-
public void testRecordFilteredModeOnlyCommitsProcessedRecords() throws InterruptedException {
57+
void testRecordFilteredModeOnlyCommitsProcessedRecords() throws InterruptedException {
5858
// Given: A container with RECORD_FILTERED ack mode
5959
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
6060
Consumer<String, String> consumer = mock(Consumer.class);
@@ -111,7 +111,7 @@ public void testRecordFilteredModeOnlyCommitsProcessedRecords() throws Interrupt
111111

112112
@SuppressWarnings({"unchecked", "deprecation"})
113113
@Test
114-
public void testRecordFilteredModeWithAllRecordsFiltered() throws InterruptedException {
114+
void testRecordFilteredModeWithAllRecordsFiltered() throws InterruptedException {
115115
// Given: All records are filtered
116116
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
117117
Consumer<String, String> consumer = mock(Consumer.class);
@@ -159,7 +159,7 @@ public void testRecordFilteredModeWithAllRecordsFiltered() throws InterruptedExc
159159

160160
@SuppressWarnings({"unchecked", "deprecation"})
161161
@Test
162-
public void testRecordFilteredModeWithMixedPartitions() throws InterruptedException {
162+
void testRecordFilteredModeWithMixedPartitions() throws InterruptedException {
163163
// Given: Mixed partitions with different filtering scenarios
164164
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
165165
Consumer<String, String> consumer = mock(Consumer.class);
@@ -222,7 +222,7 @@ public void testRecordFilteredModeWithMixedPartitions() throws InterruptedExcept
222222

223223
@SuppressWarnings({"unchecked", "deprecation"})
224224
@Test
225-
public void testRecordFilteredModeEfficiencyGains() throws InterruptedException {
225+
void testRecordFilteredModeEfficiencyGains() throws InterruptedException {
226226
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
227227
Consumer<String, String> consumer = mock(Consumer.class);
228228
given(consumerFactory.createConsumer(any(), any(), any(), any())).willReturn(consumer);
@@ -275,7 +275,7 @@ public void testRecordFilteredModeEfficiencyGains() throws InterruptedException
275275

276276
@SuppressWarnings({"unchecked", "deprecation"})
277277
@Test
278-
public void testRecordFilteredModeDoesNotBreakNormalProcessing() throws InterruptedException {
278+
void testRecordFilteredModeDoesNotBreakNormalProcessing() throws InterruptedException {
279279
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
280280
Consumer<String, String> consumer = mock(Consumer.class);
281281
given(consumerFactory.createConsumer(any(), any(), any(), any())).willReturn(consumer);

spring-kafka/src/test/java/org/springframework/kafka/listener/AckModeRecordWithFilteringTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
* @author Chaedong Im
5151
* @see AckModeRecordFilteredTest
5252
*/
53-
public class AckModeRecordWithFilteringTest {
53+
class AckModeRecordWithFilteringTest {
5454

5555
@SuppressWarnings({"unchecked", "deprecation"})
5656
@Test
57-
public void testCurrentRecordModeCommitsAllRecords() throws InterruptedException {
57+
void testCurrentRecordModeCommitsAllRecords() throws InterruptedException {
5858
// Given: A container with RECORD ack mode and a filter that filters out even offsets
5959
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
6060
Consumer<String, String> consumer = mock(Consumer.class);
@@ -111,7 +111,7 @@ public void testCurrentRecordModeCommitsAllRecords() throws InterruptedException
111111

112112
@SuppressWarnings({"unchecked", "deprecation"})
113113
@Test
114-
public void testAllRecordsFilteredStillCommits() throws InterruptedException {
114+
void testAllRecordsFilteredStillCommits() throws InterruptedException {
115115
// Given: A container where all records are filtered
116116
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
117117
Consumer<String, String> consumer = mock(Consumer.class);
@@ -159,7 +159,7 @@ public void testAllRecordsFilteredStillCommits() throws InterruptedException {
159159

160160
@SuppressWarnings({"unchecked", "deprecation"})
161161
@Test
162-
public void testMixedPartitionsWithFiltering() throws InterruptedException {
162+
void testMixedPartitionsWithFiltering() throws InterruptedException {
163163
// Given: Multiple partitions with different records
164164
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
165165
Consumer<String, String> consumer = mock(Consumer.class);
@@ -223,7 +223,7 @@ record -> record.value().contains("skip");
223223

224224
@SuppressWarnings({"unchecked", "deprecation"})
225225
@Test
226-
public void testCommitLogging() throws InterruptedException {
226+
void testCommitLogging() throws InterruptedException {
227227
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
228228
Consumer<String, String> consumer = mock(Consumer.class);
229229
given(consumerFactory.createConsumer(any(), any(), any(), any())).willReturn(consumer);
@@ -270,7 +270,7 @@ public void testCommitLogging() throws InterruptedException {
270270

271271
@SuppressWarnings({"unchecked", "deprecation"})
272272
@Test
273-
public void testAckDiscardedParameterBehavior() throws InterruptedException {
273+
void testAckDiscardedParameterBehavior() throws InterruptedException {
274274
ConsumerFactory<String, String> consumerFactory = mock(ConsumerFactory.class);
275275
Consumer<String, String> consumer = mock(Consumer.class);
276276
given(consumerFactory.createConsumer(any(), any(), any(), any())).willReturn(consumer);

0 commit comments

Comments
 (0)