use of com.yahoo.foo.TestReferenceConfig in project vespa by vespa-engine.
the class FileConfigSubscriptionTest method require_that_dir_config_id_reference_is_not_changed.
@Test
public void require_that_dir_config_id_reference_is_not_changed() {
final String cfgDir = "src/test/resources/configs/foo";
final String cfgId = "dir:" + cfgDir;
final ConfigKey<TestReferenceConfig> key = new ConfigKey<>(TestReferenceConfig.class, cfgId);
ConfigSubscriber subscriber = new ConfigSubscriber();
ConfigSubscription<TestReferenceConfig> sub = ConfigSubscription.get(key, subscriber, new DirSource(new File(cfgDir)), new TimingValues());
assertTrue(sub.nextConfig(1000));
assertThat(sub.getConfigState().getConfig().configId(), is(cfgId));
}
Aggregations