use of org.neo4j.consistency.report.ConsistencySummaryStatistics in project neo4j by neo4j.
the class FullCheckIntegrationTest method shouldReportNodeDynamicLabelContainingUnknownLabelAsNodeInconsistency.
@Test
public void shouldReportNodeDynamicLabelContainingUnknownLabelAsNodeInconsistency() throws Exception {
// given
fixture.apply(new GraphStoreFixture.Transaction() {
@Override
protected void transactionData(GraphStoreFixture.TransactionDataBuilder tx, GraphStoreFixture.IdGenerator next) {
NodeRecord nodeRecord = new NodeRecord(next.node(), false, -1, -1);
DynamicRecord record = inUse(new DynamicRecord(next.nodeLabel()));
Collection<DynamicRecord> newRecords = new ArrayList<>();
allocateFromNumbers(newRecords, prependNodeId(nodeRecord.getId(), new long[] { 42L }), new ReusableRecordsAllocator(60, record));
nodeRecord.setLabelField(dynamicPointer(newRecords), newRecords);
tx.create(nodeRecord);
}
});
// when
ConsistencySummaryStatistics stats = check();
// then
on(stats).verify(RecordType.NODE, 1).andThatsAllFolks();
}
use of org.neo4j.consistency.report.ConsistencySummaryStatistics in project neo4j by neo4j.
the class FullCheckIntegrationTest method shouldReportWrongNodeCountsEntries.
@Test
public void shouldReportWrongNodeCountsEntries() throws Exception {
// given
fixture.apply(new GraphStoreFixture.Transaction() {
@Override
protected void transactionData(GraphStoreFixture.TransactionDataBuilder tx, GraphStoreFixture.IdGenerator next) {
tx.incrementNodeCount(label3, 1);
}
});
// when
ConsistencySummaryStatistics stats = check();
// then
on(stats).verify(RecordType.COUNTS, 1).andThatsAllFolks();
}
Aggregations