use of org.apache.flink.api.common.externalresource.ExternalResourceDriver in project flink by apache.
the class ExternalResourceUtilsTest method testNotConfiguredFactoryClass.
@Test
public void testNotConfiguredFactoryClass() {
final Configuration config = new Configuration();
final Map<Class<?>, Iterator<?>> plugins = new HashMap<>();
plugins.put(ExternalResourceDriverFactory.class, IteratorUtils.singletonIterator(new TestingExternalResourceDriverFactory()));
final PluginManager testingPluginManager = new TestingPluginManager(plugins);
config.set(ExternalResourceOptions.EXTERNAL_RESOURCE_LIST, Collections.singletonList(RESOURCE_NAME_1));
final Map<String, ExternalResourceDriver> externalResourceDrivers = ExternalResourceUtils.externalResourceDriversFromConfig(config, testingPluginManager);
assertThat(externalResourceDrivers.entrySet(), is(empty()));
}
Aggregations