visWriterBBB).get(
0);
final SpatialQuery query = new SpatialQuery(
testGeoFilter);
CloseableIterator it1 = mockDataStore.query(
adapter,
index,
query,
-1,
"aaa",
"bbb");
int count = 0;
while (it1.hasNext()) {
it1.next();
count++;
}
assertEquals(
3,
count);
CountDataStatistics countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
adapter.getAdapterId(),
CountDataStatistics.STATS_ID,
"aaa",
"bbb");
assertEquals(
3,
countStats.getCount());
countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
adapter.getAdapterId(),
CountDataStatistics.STATS_ID,
"aaa");
assertEquals(
2,
countStats.getCount());
countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
adapter.getAdapterId(),
CountDataStatistics.STATS_ID,
"bbb");
assertEquals(
1,
countStats.getCount());
assertFalse(mockDataStore.deleteEntry(
index,
new ByteArrayId("test_pt_2".getBytes()),
adapter.getAdapterId(),
"aaa"));
it1 = mockDataStore.query(adapter,
index,
query,
-1,
"aaa",
"bbb");
count = 0;
while (it1.hasNext()) {
it1.next();
count++;
}
assertEquals(
3,
count);
assertTrue(mockDataStore.deleteEntry(
index,
new ByteArrayId("test_pt".getBytes()),
adapter.getAdapterId(),
"aaa"));
it1 = mockDataStore.query(adapter,
index,
query,
-1,
"aaa",
"bbb");
count = 0;
while (it1.hasNext()) {
it1.next();
count++;
}
assertEquals(
2,
count);
countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
adapter.getAdapterId(),
CountDataStatistics.STATS_ID,
"aaa");
assertEquals(
1,
countStats.getCount());
countStats = (CountDataStatistics) this.statsStore.getDataStatistics(
adapter.getAdapterId(),
CountDataStatistics.STATS_ID,
"bbb");
assertEquals(
1,
countStats.getCount());
mockDataStore.deleteEntries(
adapter,
index,
"aaa",
"bbb");
it1 = mockDataStore.query(adapter,
index,
query,
-1,
"aaa",
"bbb");
count = 0;
while (it1.hasNext()) {
it1.next();
count++;
}
assertEquals(
0,
count);