use of com.navercorp.pinpoint.hbase.schema.reader.core.ChangeSet in project pinpoint by naver.
the class ChangeSetManagerTest method filterExecutedChangeSets_invalidOrder.
@Test(expected = IllegalArgumentException.class)
public void filterExecutedChangeSets_invalidOrder() {
ChangeSet changeSet1 = newChangeSet("id1", "value1");
List<ChangeSet> changeSets = Arrays.asList(changeSet1);
List<SchemaChangeLog> schemaChangeLogs = Arrays.asList(newSchemaChangeLog("id1", "value1", 2));
ChangeSetManager changeSetManager = new ChangeSetManager(changeSets);
changeSetManager.filterExecutedChangeSets(schemaChangeLogs);
}
use of com.navercorp.pinpoint.hbase.schema.reader.core.ChangeSet in project pinpoint by naver.
the class ChangeSetManagerTest method getExecutedChangeSets_invalidOrder.
@Test(expected = IllegalArgumentException.class)
public void getExecutedChangeSets_invalidOrder() {
ChangeSet changeSet1 = newChangeSet("id1", "value1");
List<ChangeSet> changeSets = Arrays.asList(changeSet1);
List<SchemaChangeLog> schemaChangeLogs = Arrays.asList(newSchemaChangeLog("id1", "value1", 2));
ChangeSetManager changeSetManager = new ChangeSetManager(changeSets);
changeSetManager.getExecutedChangeSets(schemaChangeLogs);
}
use of com.navercorp.pinpoint.hbase.schema.reader.core.ChangeSet in project pinpoint by naver.
the class ChangeSetManagerTest method getExecutedChangeSets_invalidId.
@Test(expected = IllegalArgumentException.class)
public void getExecutedChangeSets_invalidId() {
ChangeSet changeSet = newChangeSet("id1", "value1");
List<ChangeSet> changeSets = Arrays.asList(changeSet);
List<SchemaChangeLog> schemaChangeLogs = Arrays.asList(newSchemaChangeLog("id2", "value1", 1));
ChangeSetManager changeSetManager = new ChangeSetManager(changeSets);
changeSetManager.getExecutedChangeSets(schemaChangeLogs);
}
use of com.navercorp.pinpoint.hbase.schema.reader.core.ChangeSet in project pinpoint by naver.
the class ChangeSetManagerTest method filterExecutedChangeSets.
@Test
public void filterExecutedChangeSets() {
ChangeSet changeSet1 = newChangeSet("id1", "value1");
ChangeSet changeSet2 = newChangeSet("id2", "value2");
ChangeSet changeSet3 = newChangeSet("id3", "value3");
ChangeSet changeSet4 = newChangeSet("id4", "value4");
List<ChangeSet> changeSets = Arrays.asList(changeSet1, changeSet2, changeSet3, changeSet4);
List<SchemaChangeLog> schemaChangeLogs = newSchemaChangeLogs(changeSet1);
ChangeSetManager changeSetManager = new ChangeSetManager(changeSets);
List<ChangeSet> filteredChangeSets = changeSetManager.filterExecutedChangeSets(schemaChangeLogs);
assertThat(filteredChangeSets, contains(changeSet2, changeSet3, changeSet4));
}
use of com.navercorp.pinpoint.hbase.schema.reader.core.ChangeSet in project pinpoint by naver.
the class HbaseSchemaCommandManagerTest method modifyingNonExistingTableShouldFail.
@Test(expected = InvalidHbaseSchemaException.class)
public void modifyingNonExistingTableShouldFail() {
String namespace = "namespace";
String tableName = "table";
String nonExistingTableName = "anotherTable";
HTableDescriptor existingTable = createHtd(namespace, tableName, "CF");
HbaseSchemaCommandManager manager = new HbaseSchemaCommandManager(namespace, null, Arrays.asList(existingTable));
TableChange modifyTableChange = newTableChange(ChangeType.MODIFY, nonExistingTableName);
ChangeSet modifyTableChangeSet = newChangeSet(modifyTableChange);
manager.applyChangeSet(modifyTableChangeSet);
}
Aggregations