Search in sources :

Example 1 with FDBStoreTimer

use of com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer in project fdb-record-layer by FoundationDB.

the class ScopedInterningLayer method readReverse.

@Override
protected CompletableFuture<Optional<String>> readReverse(FDBStoreTimer timer, Long value) {
    FDBRecordContext context = database.openContext();
    context.setTimer(timer);
    return interningLayerFuture.thenCompose(layer -> layer.readReverse(context, value)).whenComplete((ignored, th) -> context.close());
}
Also used : Arrays(java.util.Arrays) LogMessageKeys(com.apple.foundationdb.record.logging.LogMessageKeys) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) ResolverResult(com.apple.foundationdb.record.provider.foundationdb.keyspace.ResolverResult) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) CompletableFuture(java.util.concurrent.CompletableFuture) FDBDatabase(com.apple.foundationdb.record.provider.foundationdb.FDBDatabase) LocatableResolver(com.apple.foundationdb.record.provider.foundationdb.keyspace.LocatableResolver) Subspace(com.apple.foundationdb.subspace.Subspace) KeySpacePath(com.apple.foundationdb.record.provider.foundationdb.keyspace.KeySpacePath) Optional(java.util.Optional) API(com.apple.foundationdb.annotation.API) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ResolvedKeySpacePath(com.apple.foundationdb.record.provider.foundationdb.keyspace.ResolvedKeySpacePath) FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext)

Example 2 with FDBStoreTimer

use of com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer in project fdb-record-layer by FoundationDB.

the class RecordCursorTest method pipelineWithOuterLimits.

@ParameterizedTest(name = "pipelineWithOuterLimits [outOfBand = {0}]")
@BooleanSource
public void pipelineWithOuterLimits(boolean outOfBand) {
    final RecordCursor.NoNextReason[] possibleNoNextReasons = new RecordCursor.NoNextReason[] { RecordCursor.NoNextReason.SOURCE_EXHAUSTED, outOfBand ? RecordCursor.NoNextReason.TIME_LIMIT_REACHED : RecordCursor.NoNextReason.RETURN_LIMIT_REACHED };
    final List<Integer> ints = IntStream.range(0, 10).boxed().collect(Collectors.toList());
    final FDBStoreTimer timer = new FDBStoreTimer();
    final BiFunction<Integer, byte[], RecordCursor<Pair<Integer, Integer>>> innerFunc = (x, continuation) -> {
        final RecordCursor<Integer> intCursor = RecordCursor.fromList(ints, continuation);
        final RecordCursor<Integer> limitedCursor;
        if (outOfBand) {
            limitedCursor = new FakeOutOfBandCursor<>(intCursor, 3);
        } else {
            limitedCursor = intCursor.limitRowsTo(3);
        }
        return limitedCursor.filter(y -> y < x).map(y -> Pair.of(x, y));
    };
    final Function<byte[], RecordCursor<Integer>> outerFunc = continuation -> {
        final RecordCursor<Integer> intCursor = RecordCursor.fromList(ints, continuation);
        final RecordCursor<Integer> limitedCursor;
        if (outOfBand) {
            limitedCursor = new FakeOutOfBandCursor<>(intCursor, 3);
        } else {
            limitedCursor = intCursor.limitRowsTo(3);
        }
        return limitedCursor.filterInstrumented(x -> x >= 7 && x < 9, timer, FDBStoreTimer.Counts.QUERY_FILTER_GIVEN, FDBStoreTimer.Events.QUERY_FILTER, FDBStoreTimer.Counts.QUERY_FILTER_PASSED, FDBStoreTimer.Counts.QUERY_DISCARDED);
    };
    int results = iterateGrid(continuation -> RecordCursor.flatMapPipelined(outerFunc, innerFunc, continuation, 5), possibleNoNextReasons);
    assertEquals(15, results);
    // Note that as only the outer filter is instrumented, these assertions are based on only the outer filter.
    // Should be:
    // Itr 1: 0, 1, 2
    // Itr 2: 3, 4, 5
    // Itr 3: 6, 7 (0, 1, 2), 8
    // Itr 4: 7 (3, 4, 5), 8, 9
    // Itr 5: 7 (6, 7, 8), 8, 9
    // Itr 6: 7 (9), 8 (0, 1, 2), 9
    // Itr 7: 8 (3, 4, 5), 9
    // Itr 8: 8 (6, 7, 8), 9
    // Itr 9: 8 (9), 9
    assertEquals(24, timer.getCount(FDBStoreTimer.Counts.QUERY_FILTER_GIVEN));
    assertEquals(11, timer.getCount(FDBStoreTimer.Counts.QUERY_FILTER_PASSED));
    assertEquals(13, timer.getCount(FDBStoreTimer.Counts.QUERY_DISCARDED));
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) BiFunction(java.util.function.BiFunction) Timer(java.util.Timer) ByteBuffer(java.nio.ByteBuffer) Pair(org.apache.commons.lang3.tuple.Pair) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) SkipCursor(com.apple.foundationdb.record.cursors.SkipCursor) TimerTask(java.util.TimerTask) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) ScheduledThreadPoolExecutor(java.util.concurrent.ScheduledThreadPoolExecutor) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) ByteOrder(java.nio.ByteOrder) List(java.util.List) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Optional(java.util.Optional) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) IntStream(java.util.stream.IntStream) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) MapCursor(com.apple.foundationdb.record.cursors.MapCursor) LazyCursor(com.apple.foundationdb.record.cursors.LazyCursor) RowLimitedCursor(com.apple.foundationdb.record.cursors.RowLimitedCursor) FilterCursor(com.apple.foundationdb.record.cursors.FilterCursor) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) CompletableFuture(java.util.concurrent.CompletableFuture) AsyncUtil(com.apple.foundationdb.async.AsyncUtil) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) Iterators(com.google.common.collect.Iterators) ArrayList(java.util.ArrayList) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) BooleanSource(com.apple.test.BooleanSource) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) MoreAsyncUtil(com.apple.foundationdb.async.MoreAsyncUtil) Matchers.oneOf(org.hamcrest.Matchers.oneOf) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) Iterator(java.util.Iterator) Executor(java.util.concurrent.Executor) Matchers(org.hamcrest.Matchers) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ForkJoinPool(java.util.concurrent.ForkJoinPool) Collections(java.util.Collections) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) BooleanSource(com.apple.test.BooleanSource)

Example 3 with FDBStoreTimer

use of com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer in project fdb-record-layer by FoundationDB.

the class UnorderedUnionCursorTest method loopIterationWithLimit.

@Test
public void loopIterationWithLimit() throws ExecutionException, InterruptedException {
    FDBStoreTimer timer = new FDBStoreTimer();
    FirableCursor<Integer> secondCursor = new FirableCursor<>(RecordCursor.fromList(Arrays.asList(3, 4)));
    RecordCursor<Integer> cursor = UnorderedUnionCursor.create(Arrays.asList(continuation -> RecordCursor.fromList(Arrays.asList(1, 2), continuation).limitRowsTo(1), continuation -> secondCursor), null, timer);
    RecordCursorResult<Integer> cursorResult = cursor.getNext();
    assertEquals(1, (int) cursorResult.get());
    CompletableFuture<RecordCursorResult<Integer>> cursorResultFuture = cursor.onNext();
    assertFalse(cursorResultFuture.isDone());
    secondCursor.fire();
    cursorResult = cursorResultFuture.get();
    assertEquals(3, (int) cursorResult.get());
    cursorResultFuture = cursor.onNext();
    assertFalse(cursorResultFuture.isDone());
    secondCursor.fire();
    cursorResult = cursorResultFuture.get();
    assertEquals(4, (int) cursorResult.get());
    cursorResultFuture = cursor.onNext();
    assertFalse(cursorResultFuture.isDone());
    secondCursor.fire();
    cursorResult = cursorResultFuture.get();
    assertFalse(cursorResult.hasNext());
    assertEquals(RecordCursor.NoNextReason.RETURN_LIMIT_REACHED, cursorResult.getNoNextReason());
    assertThat(timer.getCount(FDBStoreTimer.Events.QUERY_INTERSECTION), lessThanOrEqualTo(5));
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) CompletableFuture(java.util.concurrent.CompletableFuture) Function(java.util.function.Function) FDBTestBase(com.apple.foundationdb.record.provider.foundationdb.FDBTestBase) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) RecordCursorIterator(com.apple.foundationdb.record.RecordCursorIterator) Tag(org.junit.jupiter.api.Tag) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) ValueSource(org.junit.jupiter.params.provider.ValueSource) Iterator(java.util.Iterator) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Tags(com.apple.test.Tags) Matchers.lessThanOrEqualTo(org.hamcrest.Matchers.lessThanOrEqualTo) Collectors(java.util.stream.Collectors) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) List(java.util.List) RecordCursor(com.apple.foundationdb.record.RecordCursor) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest) Matchers.is(org.hamcrest.Matchers.is) Collections(java.util.Collections) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest)

Example 4 with FDBStoreTimer

use of com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer in project fdb-record-layer by FoundationDB.

the class ProbableIntersectionCursorTest method resumeFromContinuation.

/**
 * Test that the cursor can be resumed by deserializing its state from the continuation object.
 */
@Test
public void resumeFromContinuation() {
    final FDBStoreTimer timer = new FDBStoreTimer();
    final List<Integer> list1 = Arrays.asList(10, 2, 5, 6, 8, 19, 0);
    final List<Integer> list2 = Arrays.asList(9, 1, 3, 5, 2, 4, 8);
    final List<Function<byte[], RecordCursor<Integer>>> cursorFuncs = listsToFunctions(Arrays.asList(list1, list2));
    final Function<byte[], ProbableIntersectionCursor<Integer>> intersectionCursorFunction = continuation -> ProbableIntersectionCursor.create(Collections::singletonList, cursorFuncs, continuation, timer);
    final Iterator<Integer> resultIterator = Iterators.forArray(5, 2, 8);
    byte[] continuation = null;
    boolean done = false;
    List<BloomFilter<List<Object>>> lastBloomFilters = null;
    while (!done) {
        ProbableIntersectionCursor<Integer> intersectionCursor = intersectionCursorFunction.apply(continuation);
        List<BloomFilter<List<Object>>> bloomFilters = intersectionCursor.getCursorStates().stream().map(ProbableIntersectionCursorState::getBloomFilter).collect(Collectors.toList());
        if (lastBloomFilters != null) {
            assertEquals(lastBloomFilters, bloomFilters);
        }
        lastBloomFilters = bloomFilters;
        RecordCursorResult<Integer> result = intersectionCursor.getNext();
        if (resultIterator.hasNext()) {
            assertThat(result.hasNext(), is(true));
            assertEquals(resultIterator.next(), result.get());
            assertThat(result.getContinuation().isEnd(), is(false));
            assertNotNull(result.getContinuation().toBytes());
        } else {
            assertThat(result.hasNext(), is(false));
            assertEquals(RecordCursor.NoNextReason.SOURCE_EXHAUSTED, result.getNoNextReason());
            assertThat(result.getContinuation().isEnd(), is(true));
            assertNull(result.getContinuation().toBytes());
            done = true;
        }
        continuation = result.getContinuation().toBytes();
    }
    assertEquals(3, timer.getCount(FDBStoreTimer.Counts.QUERY_INTERSECTION_PLAN_MATCHES));
    assertEquals(list1.size() + list2.size() - 3, timer.getCount(FDBStoreTimer.Counts.QUERY_INTERSECTION_PLAN_NONMATCHES));
}
Also used : IntStream(java.util.stream.IntStream) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) RowLimitedCursor(com.apple.foundationdb.record.cursors.RowLimitedCursor) LoggerFactory(org.slf4j.LoggerFactory) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Random(java.util.Random) CompletableFuture(java.util.concurrent.CompletableFuture) AsyncUtil(com.apple.foundationdb.async.AsyncUtil) Function(java.util.function.Function) Iterators(com.google.common.collect.Iterators) HashSet(java.util.HashSet) RecordCursorResult(com.apple.foundationdb.record.RecordCursorResult) KeyValueLogMessage(com.apple.foundationdb.record.logging.KeyValueLogMessage) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) TestLogMessageKeys(com.apple.foundationdb.record.logging.TestLogMessageKeys) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) FirableCursor(com.apple.foundationdb.record.cursors.FirableCursor) Matchers.lessThan(org.hamcrest.Matchers.lessThan) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Matchers.lessThanOrEqualTo(org.hamcrest.Matchers.lessThanOrEqualTo) BloomFilter(com.google.common.hash.BloomFilter) Set(java.util.Set) Collectors(java.util.stream.Collectors) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) Stream(java.util.stream.Stream) RecordCursorProto(com.apple.foundationdb.record.RecordCursorProto) RecordCursor(com.apple.foundationdb.record.RecordCursor) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest) Matchers.is(org.hamcrest.Matchers.is) Collections(java.util.Collections) BloomFilter(com.google.common.hash.BloomFilter) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Function(java.util.function.Function) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) Collections(java.util.Collections) Test(org.junit.jupiter.api.Test) RecordCursorTest(com.apple.foundationdb.record.RecordCursorTest)

Example 5 with FDBStoreTimer

use of com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer in project fdb-record-layer by FoundationDB.

the class FDBRecordStoreStateCacheTest method cacheWithVersionTracking.

/**
 * Validate that caching just naturally works.
 */
@ParameterizedTest(name = "cacheWithVersionTracking (test context = {0})")
@MethodSource("testContextSource")
public void cacheWithVersionTracking(@Nonnull StateCacheTestContext testContext) throws Exception {
    boolean trackCommitVersions = fdb.isTrackLastSeenVersionOnCommit();
    boolean trackReadVersion = fdb.isTrackLastSeenVersionOnCommit();
    FDBRecordStoreStateCache currentCache = fdb.getStoreStateCache();
    try {
        fdb.setStoreStateCache(testContext.getCache(fdb));
        fdb.setTrackLastSeenVersion(true);
        FDBStoreTimer timer = new FDBStoreTimer();
        final FDBDatabase.WeakReadSemantics readSemantics = new FDBDatabase.WeakReadSemantics(0L, 5000, false);
        // Load up a read version
        try (FDBRecordContext context = fdb.openContext(null, timer, null)) {
            context.getReadVersion();
            commit(context);
        }
        // Commit a new meta-data
        long commitVersion;
        timer.reset();
        try (FDBRecordContext context = fdb.openContext(null, timer, readSemantics)) {
            openSimpleRecordStore(context);
            recordStore.setStateCacheabilityAsync(true).get();
            assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_MISS));
            recordStore.markIndexDisabled("MySimpleRecord$str_value_indexed").get();
            commit(context);
            commitVersion = context.getCommittedVersion();
        }
        // Version caching will elect to use the commit version, which is not cached
        timer.reset();
        try (FDBRecordContext context = fdb.openContext(null, timer, readSemantics)) {
            assertEquals(commitVersion, context.getReadVersion());
            openSimpleRecordStore(context);
            assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_MISS));
            assertTrue(recordStore.isIndexDisabled("MySimpleRecord$str_value_indexed"));
            // should be read only-so won't change commit version
            commit(context);
        }
        // Version caching will still use the commit version from the first (non read-only commit), but now it is in cache
        timer.reset();
        try (FDBRecordContext context = fdb.openContext(null, timer, readSemantics)) {
            assertEquals(commitVersion, context.getReadVersion());
            openSimpleRecordStore(context);
            assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_HIT));
            assertTrue(recordStore.isIndexDisabled("MySimpleRecord$str_value_indexed"));
            // Add a dummy write to increase the DB version
            context.ensureActive().addWriteConflictKey(recordStore.recordsSubspace().pack(UUID.randomUUID()));
            commit(context);
            assertThat(context.getCommittedVersion(), greaterThan(commitVersion));
            commitVersion = context.getCommittedVersion();
        }
        // The commit version will be from the commit above. This should invalidate the
        // read-version cache, but not the meta-data version cache.
        timer.reset();
        try (FDBRecordContext context = fdb.openContext(null, timer, readSemantics)) {
            assertEquals(commitVersion, context.getReadVersion());
            openSimpleRecordStore(context);
            if (testContext instanceof ReadVersionStateCacheTestContext) {
                assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_MISS));
            } else {
                assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_HIT));
            }
            assertTrue(recordStore.isIndexDisabled("MySimpleRecord$str_value_indexed"));
            // Add a dummy write to increase the DB version
            context.ensureActive().addWriteConflictKey(recordStore.recordsSubspace().pack(UUID.randomUUID()));
            commit(context);
            assertThat(context.getCommittedVersion(), greaterThan(commitVersion));
            commitVersion = context.getCommittedVersion();
        }
        // Load a new read version.
        timer.reset();
        final long readVersion;
        try (FDBRecordContext context = fdb.openContext(null, timer, null)) {
            readVersion = context.getReadVersion();
            assertThat(readVersion, greaterThanOrEqualTo(commitVersion));
            openSimpleRecordStore(context);
            if (testContext instanceof ReadVersionStateCacheTestContext) {
                assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_MISS));
            } else {
                assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_HIT));
            }
            assertTrue(recordStore.isIndexDisabled("MySimpleRecord$str_value_indexed"));
        }
        // Load the meta-data using the cached read version.
        timer.reset();
        try (FDBRecordContext context = fdb.openContext(null, timer, readSemantics)) {
            assertEquals(readVersion, context.getReadVersion());
            openSimpleRecordStore(context);
            assertEquals(1, timer.getCount(FDBStoreTimer.Counts.STORE_STATE_CACHE_HIT));
            assertTrue(recordStore.isIndexDisabled("MySimpleRecord$str_value_indexed"));
        }
    } finally {
        fdb.setTrackLastSeenVersionOnCommit(trackCommitVersions);
        fdb.setTrackLastSeenVersionOnRead(trackReadVersion);
        fdb.setStoreStateCache(currentCache);
    }
}
Also used : FDBRecordContext(com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext) FDBStoreTimer(com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer) FDBDatabase(com.apple.foundationdb.record.provider.foundationdb.FDBDatabase) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

FDBStoreTimer (com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer)29 Test (org.junit.jupiter.api.Test)21 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)15 FDBRecordContext (com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext)14 FDBDatabase (com.apple.foundationdb.record.provider.foundationdb.FDBDatabase)9 Nonnull (javax.annotation.Nonnull)9 Arrays (java.util.Arrays)8 List (java.util.List)8 Function (java.util.function.Function)8 Collections (java.util.Collections)7 CompletableFuture (java.util.concurrent.CompletableFuture)7 Collectors (java.util.stream.Collectors)7 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)7 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)7 RecordCursor (com.apple.foundationdb.record.RecordCursor)6 FirableCursor (com.apple.foundationdb.record.cursors.FirableCursor)6 StoreTimer (com.apple.foundationdb.record.provider.common.StoreTimer)6 RecordQueryPlan (com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan)6 Iterator (java.util.Iterator)6 ExecutionException (java.util.concurrent.ExecutionException)6