use of com.datastax.oss.driver.internal.core.metadata.schema.DefaultKeyspaceMetadata in project java-driver by datastax.
the class SchemaRefreshTest method should_detect_created_keyspace.
@Test
public void should_detect_created_keyspace() {
DefaultKeyspaceMetadata ks2 = newKeyspace("ks2", true);
SchemaRefresh refresh = new SchemaRefresh(ImmutableMap.of(OLD_KS1.getName(), OLD_KS1, ks2.getName(), ks2));
MetadataRefresh.Result result = refresh.compute(oldMetadata, false, context);
assertThat(result.newMetadata.getKeyspaces()).hasSize(2);
assertThat(result.events).containsExactly(KeyspaceChangeEvent.created(ks2));
}
Aggregations