use of io.druid.query.lookup.namespace.StaticMapExtractionNamespace in project druid by druid-io.
the class StaticMapExtractionNamespaceCacheFactoryTest method testSimplePopulator.
@Test
public void testSimplePopulator() throws Exception {
final StaticMapExtractionNamespaceCacheFactory factory = new StaticMapExtractionNamespaceCacheFactory();
final StaticMapExtractionNamespace namespace = new StaticMapExtractionNamespace(MAP);
CacheScheduler.VersionedCache versionedCache = factory.populateCache(namespace, null, null, scheduler);
Assert.assertNotNull(versionedCache);
Assert.assertEquals(factory.getVersion(), versionedCache.getVersion());
Assert.assertEquals(MAP, versionedCache.getCache());
}
use of io.druid.query.lookup.namespace.StaticMapExtractionNamespace in project druid by druid-io.
the class StaticMapExtractionNamespaceCacheFactoryTest method testNonNullLastVersionCausesAssertionError.
@Test(expected = AssertionError.class)
public void testNonNullLastVersionCausesAssertionError() {
final StaticMapExtractionNamespaceCacheFactory factory = new StaticMapExtractionNamespaceCacheFactory();
final StaticMapExtractionNamespace namespace = new StaticMapExtractionNamespace(MAP);
factory.populateCache(namespace, null, factory.getVersion(), scheduler);
}
Aggregations