Kafka Streams binder security test changes

- Invalidate security configuration in Kafka Streams binder
   security related tests. See the previous commit for more details.
This commit is contained in:
Soby Chacko
2023-07-10 15:17:35 -04:00
parent d230b62bcc
commit 203a82e046

View File

@@ -24,6 +24,7 @@ import org.apache.kafka.common.security.JaasUtils;
import org.apache.kafka.streams.kstream.KStream;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.WebApplicationType;
@@ -57,6 +58,12 @@ public class KafkaStreamsBinderJaasInitTests {
}
}
@BeforeEach
public void before() {
System.clearProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM);
javax.security.auth.login.Configuration.setConfiguration(null);
}
@Test
void testKafkaStreamsBinderJaasInitialization() {
ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(