use of org.apache.flink.kubernetes.utils.Constants.CONFIG_FILE_LOG4J_NAME in project flink by apache.
the class KubernetesJobManagerFactoryTest method testFlinkConfConfigMap.
@Test
public void testFlinkConfConfigMap() throws IOException {
kubernetesJobManagerSpecification = KubernetesJobManagerFactory.buildKubernetesJobManagerSpecification(flinkPod, kubernetesJobManagerParameters);
final ConfigMap resultConfigMap = (ConfigMap) this.kubernetesJobManagerSpecification.getAccompanyingResources().stream().filter(x -> x instanceof ConfigMap && x.getMetadata().getName().equals(FlinkConfMountDecorator.getFlinkConfConfigMapName(CLUSTER_ID))).collect(Collectors.toList()).get(0);
assertEquals(2, resultConfigMap.getMetadata().getLabels().size());
final Map<String, String> resultDatas = resultConfigMap.getData();
assertEquals(3, resultDatas.size());
assertEquals("some data", resultDatas.get(CONFIG_FILE_LOG4J_NAME));
assertEquals("some data", resultDatas.get(CONFIG_FILE_LOGBACK_NAME));
assertTrue(resultDatas.get(FLINK_CONF_FILENAME).contains(KubernetesConfigOptionsInternal.ENTRY_POINT_CLASS.key() + ": " + ENTRY_POINT_CLASS));
}
Aggregations