File tree 1 file changed +10
-0
lines changed
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 21
21
import org .apache .kafka .common .config .SslConfigs ;
22
22
import org .junit .jupiter .api .Test ;
23
23
24
+ import org .springframework .boot .autoconfigure .kafka .KafkaProperties .Admin ;
24
25
import org .springframework .boot .autoconfigure .kafka .KafkaProperties .Cleanup ;
25
26
import org .springframework .boot .autoconfigure .kafka .KafkaProperties .IsolationLevel ;
26
27
import org .springframework .boot .autoconfigure .kafka .KafkaProperties .Listener ;
27
28
import org .springframework .boot .context .properties .source .MutuallyExclusiveConfigurationPropertiesException ;
28
29
import org .springframework .core .io .ClassPathResource ;
29
30
import org .springframework .kafka .core .CleanupConfig ;
31
+ import org .springframework .kafka .core .KafkaAdmin ;
30
32
import org .springframework .kafka .listener .ContainerProperties ;
31
33
32
34
import static org .assertj .core .api .Assertions .assertThat ;
@@ -51,6 +53,14 @@ void isolationLevelEnumConsistentWithKafkaVersion() {
51
53
assertThat (original ).hasSize (IsolationLevel .values ().length );
52
54
}
53
55
56
+ @ Test
57
+ void adminDefaultValuesAreConsistent () {
58
+ KafkaAdmin admin = new KafkaAdmin (Map .of ());
59
+ Admin adminProperties = new KafkaProperties ().getAdmin ();
60
+ assertThat (admin ).hasFieldOrPropertyWithValue ("fatalIfBrokerNotAvailable" , adminProperties .isFailFast ());
61
+ assertThat (admin ).hasFieldOrPropertyWithValue ("modifyTopicConfigs" , adminProperties .isModifyTopicConfigs ());
62
+ }
63
+
54
64
@ Test
55
65
void listenerDefaultValuesAreConsistent () {
56
66
ContainerProperties container = new ContainerProperties ("test" );
You can’t perform that action at this time.
0 commit comments