Skip to content

Commit 62fedf0

Browse files
committed
Mark nested Junit5 tests with @Nested
1 parent a6cb06e commit 62fedf0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/test/java/com/mongodb/kafka/connect/source/MongoSourceConfigTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676

7777
import org.apache.kafka.common.config.ConfigException;
7878
import org.junit.jupiter.api.DisplayName;
79+
import org.junit.jupiter.api.Nested;
7980
import org.junit.jupiter.api.Test;
8081

8182
import org.bson.BsonTimestamp;
@@ -546,7 +547,8 @@ void testHeartbeatTopicName() {
546547
.getString(HEARTBEAT_TOPIC_NAME_CONFIG)));
547548
}
548549

549-
static final class StartupModeTest {
550+
@Nested
551+
final class StartupModeTest {
550552
@Test
551553
void startupMode() {
552554
assertAll(

src/test/java/com/mongodb/kafka/connect/source/StartedMongoSourceTaskTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.apache.kafka.connect.storage.OffsetStorageReader;
3232
import org.junit.jupiter.api.AfterEach;
3333
import org.junit.jupiter.api.BeforeEach;
34+
import org.junit.jupiter.api.Nested;
3435
import org.junit.jupiter.api.Test;
3536
import org.mockito.ArgumentCaptor;
3637

@@ -45,7 +46,8 @@
4546
import com.mongodb.kafka.connect.source.statistics.JmxStatisticsManager;
4647

4748
final class StartedMongoSourceTaskTest {
48-
static final class ChangeStreamIterableOptionsTest {
49+
@Nested
50+
final class ChangeStreamIterableOptionsTest {
4951
private final Map<String, String> properties = new HashMap<>();
5052
private StartedMongoSourceTask task;
5153

0 commit comments

Comments
 (0)