Search in sources :

Example 86 with RecordMetaDataBuilder

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

the class MetaDataEvolutionValidatorTest method nestedTypeChangesName.

@Test
public void nestedTypeChangesName() {
    FileDescriptor updatedFile = mutateFile(TestRecordsWithHeaderProto.getDescriptor(), fileBuilder -> fileBuilder.getMessageTypeBuilderList().forEach(message -> {
        if (message.getName().equals("HeaderRecord")) {
            message.setName("Header");
        } else if (message.getName().equals("MyRecord")) {
            message.getFieldBuilderList().forEach(field -> {
                if (field.getName().equals("header")) {
                    field.setTypeName("." + fileBuilder.getPackage() + ".Header");
                }
            });
        }
    }));
    assertThat(updatedFile.getMessageTypes().stream().map(Descriptor::getName).collect(Collectors.toList()), containsInAnyOrder("MyRecord", RecordMetaDataBuilder.DEFAULT_UNION_NAME, "Header"));
    validator.validateUnion(TestRecordsWithHeaderProto.RecordTypeUnion.getDescriptor(), updatedFile.findMessageTypeByName(RecordMetaDataBuilder.DEFAULT_UNION_NAME));
    RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecordsWithHeaderProto.getDescriptor());
    metaDataBuilder.getRecordType("MyRecord").setPrimaryKey(Key.Expressions.field("header").nest(Key.Expressions.concatenateFields("path", "rec_no")));
    RecordMetaData metaData1 = metaDataBuilder.getRecordMetaData();
    RecordMetaData metaData2 = replaceRecordsDescriptor(metaData1, updatedFile);
    validator.validate(metaData1, metaData2);
}
Also used : DescriptorProtos(com.google.protobuf.DescriptorProtos) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) Descriptor(com.google.protobuf.Descriptors.Descriptor) Descriptors(com.google.protobuf.Descriptors) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) PrefixTextTokenizer(com.apple.foundationdb.record.provider.common.text.PrefixTextTokenizer) UnaryOperator(java.util.function.UnaryOperator) TestSplitNestedTypesProto(com.apple.foundationdb.record.evolution.TestSplitNestedTypesProto) TestNewRecordTypeProto(com.apple.foundationdb.record.evolution.TestNewRecordTypeProto) TestSelfReferenceUnspooledProto(com.apple.foundationdb.record.evolution.TestSelfReferenceUnspooledProto) ArrayList(java.util.ArrayList) Tuple(com.apple.foundationdb.tuple.Tuple) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) RecordMetaDataProto(com.apple.foundationdb.record.RecordMetaDataProto) RecordMetaDataOptionsProto(com.apple.foundationdb.record.RecordMetaDataOptionsProto) DefaultTextTokenizer(com.apple.foundationdb.record.provider.common.text.DefaultTextTokenizer) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) FileDescriptor(com.google.protobuf.Descriptors.FileDescriptor) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) TestSelfReferenceProto(com.apple.foundationdb.record.evolution.TestSelfReferenceProto) TestRecords1Proto(com.apple.foundationdb.record.TestRecords1Proto) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) TestUnmergedNestedTypesProto(com.apple.foundationdb.record.evolution.TestUnmergedNestedTypesProto) FieldDescriptor(com.google.protobuf.Descriptors.FieldDescriptor) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) Test(org.junit.jupiter.api.Test) Consumer(java.util.function.Consumer) TextTokenizer(com.apple.foundationdb.record.provider.common.text.TextTokenizer) List(java.util.List) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) TestHeaderAsGroupProto(com.apple.foundationdb.record.evolution.TestHeaderAsGroupProto) RankedSet(com.apple.foundationdb.async.RankedSet) TestRecordsEnumProto(com.apple.foundationdb.record.TestRecordsEnumProto) TestRecordsWithHeaderProto(com.apple.foundationdb.record.TestRecordsWithHeaderProto) Matchers.is(org.hamcrest.Matchers.is) TestMergedNestedTypesProto(com.apple.foundationdb.record.evolution.TestMergedNestedTypesProto) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) AllSuffixesTextTokenizer(com.apple.foundationdb.record.provider.common.text.AllSuffixesTextTokenizer) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) Descriptor(com.google.protobuf.Descriptors.Descriptor) FileDescriptor(com.google.protobuf.Descriptors.FileDescriptor) FieldDescriptor(com.google.protobuf.Descriptors.FieldDescriptor) FileDescriptor(com.google.protobuf.Descriptors.FileDescriptor) Test(org.junit.jupiter.api.Test)

Example 87 with RecordMetaDataBuilder

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

the class RecordMetaDataBuilderTest method updateRecordsWithRenamed.

@Test
public void updateRecordsWithRenamed() throws Descriptors.DescriptorValidationException {
    RecordMetaDataBuilder builder = RecordMetaData.newBuilder().setRecords(TestRecords1Proto.getDescriptor());
    assertSame(builder.getRecordType("MySimpleRecord").getDescriptor().getFile(), TestRecords1Proto.getDescriptor());
    assertSame(builder.getRecordType("MyOtherRecord").getDescriptor().getFile(), TestRecords1Proto.getDescriptor());
    builder.addIndex("MyOtherRecord", "num_value_3_indexed");
    RecordMetaData metaData = builder.getRecordMetaData();
    assertEquals(Collections.singletonList(metaData.getRecordType("MyOtherRecord")), metaData.recordTypesForIndex(metaData.getIndex("MyOtherRecord$num_value_3_indexed")));
    DescriptorProtos.FileDescriptorProto.Builder fileBuilder = TestRecords1Proto.getDescriptor().toProto().toBuilder();
    fileBuilder.getMessageTypeBuilderList().forEach(message -> {
        if (message.getName().equals("MyOtherRecord")) {
            message.setName("MyOtherOtherRecord");
        } else if (message.getName().equals(RecordMetaDataBuilder.DEFAULT_UNION_NAME)) {
            message.getFieldBuilderList().forEach(field -> {
                if (field.getTypeName().endsWith("MyOtherRecord")) {
                    field.setTypeName("MyOtherOtherRecord");
                }
            });
        }
    });
    Descriptors.FileDescriptor updatedFileDescriptor = Descriptors.FileDescriptor.buildFrom(fileBuilder.build(), new Descriptors.FileDescriptor[] { TestRecords1Proto.getDescriptor() });
    builder.updateRecords(updatedFileDescriptor);
    assertSame(builder.getRecordType("MySimpleRecord").getDescriptor().getFile(), updatedFileDescriptor);
    assertThrows(MetaDataException.class, () -> builder.getRecordType("MyOtherRecord"));
    assertSame(builder.getRecordType("MyOtherOtherRecord").getDescriptor().getFile(), updatedFileDescriptor);
    metaData = builder.getRecordMetaData();
    assertEquals(Collections.singletonList(metaData.getRecordType("MyOtherOtherRecord")), metaData.recordTypesForIndex(metaData.getIndex("MyOtherRecord$num_value_3_indexed")));
    RecordMetaDataProto.MetaData metaDataProto = metaData.toProto();
    assertThat(metaDataProto.getRecordTypesList().stream().map(RecordMetaDataProto.RecordType::getName).collect(Collectors.toList()), containsInAnyOrder("MySimpleRecord", "MyOtherOtherRecord"));
    RecordMetaDataProto.Index indexProto = metaDataProto.getIndexesList().stream().filter(index -> index.getName().equals("MyOtherRecord$num_value_3_indexed")).findFirst().get();
    assertEquals(Collections.singletonList("MyOtherOtherRecord"), indexProto.getRecordTypeList());
}
Also used : TestTwoUnionsProto(com.apple.foundationdb.record.TestTwoUnionsProto) DescriptorProtos(com.google.protobuf.DescriptorProtos) TestUnionDefaultNameProto(com.apple.foundationdb.record.TestUnionDefaultNameProto) TestRecordsChained1Proto(com.apple.foundationdb.record.TestRecordsChained1Proto) TestRecordsUnsigned3Proto(com.apple.foundationdb.record.TestRecordsUnsigned3Proto) Tuple(com.apple.foundationdb.tuple.Tuple) TestRecordsDuplicateUnionFieldsReordered(com.apple.foundationdb.record.TestRecordsDuplicateUnionFieldsReordered) Expressions.concatenateFields(com.apple.foundationdb.record.metadata.Key.Expressions.concatenateFields) RecordMetaDataProto(com.apple.foundationdb.record.RecordMetaDataProto) VersionKeyExpression(com.apple.foundationdb.record.metadata.expressions.VersionKeyExpression) Expressions.concat(com.apple.foundationdb.record.metadata.Key.Expressions.concat) TestRecordsUnionWithNestedProto(com.apple.foundationdb.record.TestRecordsUnionWithNestedProto) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) TestRecords1Proto(com.apple.foundationdb.record.TestRecords1Proto) TestRecordsBadUnion2Proto(com.apple.foundationdb.record.TestRecordsBadUnion2Proto) Assertions.assertNotSame(org.junit.jupiter.api.Assertions.assertNotSame) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) TestRecordsUnsigned4Proto(com.apple.foundationdb.record.TestRecordsUnsigned4Proto) TestRecordsUnsigned1Proto(com.apple.foundationdb.record.TestRecordsUnsigned1Proto) TestRecordsWithHeaderProto(com.apple.foundationdb.record.TestRecordsWithHeaderProto) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) TestRecordsBadUnion1Proto(com.apple.foundationdb.record.TestRecordsBadUnion1Proto) TestRecordsDuplicateUnionFields(com.apple.foundationdb.record.TestRecordsDuplicateUnionFields) Descriptors(com.google.protobuf.Descriptors) TestRecordsUnionWithImportedNestedProto(com.apple.foundationdb.record.TestRecordsUnionWithImportedNestedProto) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Matchers.lessThan(org.hamcrest.Matchers.lessThan) BooleanSource(com.apple.test.BooleanSource) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Nonnull(javax.annotation.Nonnull) Expressions.field(com.apple.foundationdb.record.metadata.Key.Expressions.field) TestRecordsUnionMissingRecordProto(com.apple.foundationdb.record.TestRecordsUnionMissingRecordProto) TestRecordsUnsigned5Proto(com.apple.foundationdb.record.TestRecordsUnsigned5Proto) TestRecordsImportFlatProto(com.apple.foundationdb.record.TestRecordsImportFlatProto) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) TestRecordsUnsigned2Proto(com.apple.foundationdb.record.TestRecordsUnsigned2Proto) TestRecordsMarkedUnmarkedProto(com.apple.foundationdb.record.TestRecordsMarkedUnmarkedProto) TestRecords1EvolvedProto(com.apple.foundationdb.record.TestRecords1EvolvedProto) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) MetaDataProtoEditor(com.apple.foundationdb.record.provider.foundationdb.MetaDataProtoEditor) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) TestRecords2Proto(com.apple.foundationdb.record.TestRecords2Proto) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) TestRecordsImportProto(com.apple.foundationdb.record.TestRecordsImportProto) TestRecordsNoPrimaryKeyProto(com.apple.foundationdb.record.TestRecordsNoPrimaryKeyProto) Collections(java.util.Collections) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) RecordMetaDataProto(com.apple.foundationdb.record.RecordMetaDataProto) Descriptors(com.google.protobuf.Descriptors) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 88 with RecordMetaDataBuilder

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

the class RecordMetaDataBuilderTest method localMetaData.

@Test
public void localMetaData() throws Descriptors.DescriptorValidationException {
    // Record type moved from being imported to being present in the local descriptor
    RecordMetaDataProto.MetaData previouslyImportedMetaData = RecordMetaData.build(TestRecordsImportProto.getDescriptor()).toProto(null);
    RecordMetaDataBuilder nowFlatMetaData = RecordMetaData.newBuilder().setLocalFileDescriptor(TestRecordsImportFlatProto.getDescriptor()).setRecords(previouslyImportedMetaData);
    assertNotNull(nowFlatMetaData.getRecordType("MySimpleRecord"));
    assertSame(nowFlatMetaData.getRecordType("MySimpleRecord").getDescriptor(), TestRecordsImportFlatProto.MySimpleRecord.getDescriptor());
    assertNotNull(nowFlatMetaData.getRecordType("MyLongRecord"));
    assertSame(nowFlatMetaData.getRecordType("MyLongRecord").getDescriptor(), TestRecordsImportFlatProto.MyLongRecord.getDescriptor());
    nowFlatMetaData.build(true);
    // Record type moved from the descriptor to being in an imported file
    RecordMetaDataProto.MetaData previouslyFlatMetaData = RecordMetaData.build(TestRecordsImportFlatProto.getDescriptor()).toProto(null);
    RecordMetaDataBuilder nowImportedMetaData = RecordMetaData.newBuilder().setLocalFileDescriptor(TestRecordsImportProto.getDescriptor()).setRecords(previouslyFlatMetaData);
    assertNotNull(nowImportedMetaData.getRecordType("MySimpleRecord"));
    assertSame(nowImportedMetaData.getRecordType("MySimpleRecord").getDescriptor(), TestRecords1Proto.MySimpleRecord.getDescriptor());
    assertNotNull(nowImportedMetaData.getRecordType("MyLongRecord"));
    assertSame(nowImportedMetaData.getRecordType("MyLongRecord").getDescriptor(), TestRecords2Proto.MyLongRecord.getDescriptor());
    nowImportedMetaData.build(true);
    // The original meta-data
    RecordMetaDataProto.MetaData originalMetaData = RecordMetaData.build(TestRecords1Proto.getDescriptor()).toProto(null);
    // Evolve the local file descriptor by adding a record type to the union
    RecordMetaDataBuilder evolvedMetaDataBuilder = RecordMetaData.newBuilder().setLocalFileDescriptor(TestRecords1EvolvedProto.getDescriptor()).setRecords(originalMetaData);
    MetaDataException e = assertThrows(MetaDataException.class, () -> evolvedMetaDataBuilder.getRecordType("AnotherRecord"));
    assertEquals("Unknown record type AnotherRecord", e.getMessage());
    assertSame(evolvedMetaDataBuilder.build(true).getUnionDescriptor(), TestRecords1EvolvedProto.RecordTypeUnion.getDescriptor());
    // Add an additional field to the record type union for _MySimpleRecord, and validate that field is *not* used when this is
    // used with a local file descriptor, but that it is used when the new file is set with updateRecords
    DescriptorProtos.FileDescriptorProto.Builder evolvedFileBuilder = TestRecords1EvolvedProto.getDescriptor().toProto().toBuilder();
    evolvedFileBuilder.getMessageTypeBuilderList().forEach(message -> {
        if (message.getName().equals(RecordMetaDataBuilder.DEFAULT_UNION_NAME)) {
            message.getFieldBuilderList().forEach(field -> {
                if (field.getName().equals("_MySimpleRecord")) {
                    field.setName("_MySimpleRecord_Old");
                }
            });
            message.addField(DescriptorProtos.FieldDescriptorProto.newBuilder().setLabel(DescriptorProtos.FieldDescriptorProto.Label.LABEL_OPTIONAL).setType(DescriptorProtos.FieldDescriptorProto.Type.TYPE_MESSAGE).setTypeName("." + TestRecords1EvolvedProto.getDescriptor().getPackage() + ".MySimpleRecord").setName("_MySimpleRecord_New").setNumber(message.getFieldBuilderList().stream().mapToInt(DescriptorProtos.FieldDescriptorProto.Builder::getNumber).max().orElse(0) + 1));
        }
    });
    Descriptors.FileDescriptor evolvedFile2 = Descriptors.FileDescriptor.buildFrom(evolvedFileBuilder.build(), TestRecords1EvolvedProto.getDescriptor().getDependencies().toArray(new Descriptors.FileDescriptor[0]));
    RecordMetaData metaData2 = RecordMetaData.newBuilder().setLocalFileDescriptor(evolvedFile2).setRecords(originalMetaData).build();
    assertSame(evolvedFile2.findMessageTypeByName(RecordMetaDataBuilder.DEFAULT_UNION_NAME).findFieldByName("_MySimpleRecord_Old"), metaData2.getUnionFieldForRecordType(metaData2.getRecordType("MySimpleRecord")));
    RecordMetaDataBuilder metaDataBuilder3 = RecordMetaData.newBuilder().setRecords(originalMetaData);
    metaDataBuilder3.updateRecords(evolvedFile2);
    RecordMetaData metaData3 = metaDataBuilder3.build();
    assertSame(evolvedFile2.findMessageTypeByName(RecordMetaDataBuilder.DEFAULT_UNION_NAME).findFieldByName("_MySimpleRecord_New"), metaData3.getUnionFieldForRecordType(metaData3.getRecordType("MySimpleRecord")));
}
Also used : RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) RecordMetaDataProto(com.apple.foundationdb.record.RecordMetaDataProto) Descriptors(com.google.protobuf.Descriptors) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 89 with RecordMetaDataBuilder

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

the class RecordMetaDataBuilderTest method primaryIndexDoesOverlapPrimaryKey.

@ParameterizedTest(name = "primaryIndexDoesOverlapPrimaryKey [indexCounterBasedSubspaceKey = {0}]")
@BooleanSource
public void primaryIndexDoesOverlapPrimaryKey(final boolean indexCounterBasedSubspaceKey) {
    RecordMetaDataBuilder builder = createBuilder(TestRecords1Proto.getDescriptor(), indexCounterBasedSubspaceKey);
    builder.addIndex("MySimpleRecord", "MySimpleRecord$PRIMARY", "rec_no");
    RecordMetaData metaData = builder.getRecordMetaData();
    Index index = metaData.getIndex("MySimpleRecord$PRIMARY");
    assertNotNull(index);
    assertNotNull(index.getPrimaryKeyComponentPositions());
    assertArrayEquals(new int[] { 0 }, index.getPrimaryKeyComponentPositions());
    if (!indexCounterBasedSubspaceKey) {
        assertEquals(index.getName(), index.getSubspaceKey());
    } else {
        assertEquals(4L, index.getSubspaceKey());
    }
}
Also used : RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) BooleanSource(com.apple.test.BooleanSource)

Example 90 with RecordMetaDataBuilder

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

the class RecordMetaDataBuilderTest method updateRecordsWithNewUnionField.

@ParameterizedTest(name = "updateRecordsWithNewUnionField [reorderFields = {0}]")
@BooleanSource
public void updateRecordsWithNewUnionField(boolean reorderFields) {
    final RecordMetaData oldMetaData = RecordMetaData.build(TestRecords1Proto.getDescriptor());
    final RecordType oldSimpleRecord = oldMetaData.getRecordType("MySimpleRecord");
    RecordMetaDataBuilder builder = RecordMetaData.newBuilder().setRecords(TestRecords1Proto.getDescriptor());
    assertSame(builder.getRecordType("MySimpleRecord").getDescriptor().getFile(), TestRecords1Proto.getDescriptor());
    assertSame(builder.getRecordType("MyOtherRecord").getDescriptor().getFile(), TestRecords1Proto.getDescriptor());
    Descriptors.FileDescriptor updatedFileDescriptor;
    if (reorderFields) {
        updatedFileDescriptor = TestRecordsDuplicateUnionFieldsReordered.getDescriptor();
    } else {
        updatedFileDescriptor = TestRecordsDuplicateUnionFields.getDescriptor();
    }
    builder.updateRecords(updatedFileDescriptor);
    RecordMetaData newMetaData = builder.getRecordMetaData();
    assertEquals(TestRecords1EvolvedProto.RecordTypeUnion._MYSIMPLERECORD_FIELD_NUMBER, oldMetaData.getUnionFieldForRecordType(oldSimpleRecord).getNumber());
    RecordType newSimpleRecord = newMetaData.getRecordType("MySimpleRecord");
    assertSame(newMetaData.getUnionDescriptor().findFieldByName("_MySimpleRecord_new"), newMetaData.getUnionFieldForRecordType(newSimpleRecord));
    assertThat(oldMetaData.getUnionFieldForRecordType(oldSimpleRecord).getNumber(), lessThan(newMetaData.getUnionFieldForRecordType(newSimpleRecord).getNumber()));
    assertEquals(oldSimpleRecord.getSinceVersion(), newSimpleRecord.getSinceVersion());
    MetaDataEvolutionValidator.getDefaultInstance().validate(oldMetaData, newMetaData);
}
Also used : RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordMetaDataBuilder(com.apple.foundationdb.record.RecordMetaDataBuilder) Descriptors(com.google.protobuf.Descriptors) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) BooleanSource(com.apple.test.BooleanSource)

Aggregations

RecordMetaDataBuilder (com.apple.foundationdb.record.RecordMetaDataBuilder)150 Test (org.junit.jupiter.api.Test)91 RecordMetaData (com.apple.foundationdb.record.RecordMetaData)69 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)43 Nonnull (javax.annotation.Nonnull)22 Index (com.apple.foundationdb.record.metadata.Index)21 Descriptors (com.google.protobuf.Descriptors)15 TestRecords1Proto (com.apple.foundationdb.record.TestRecords1Proto)14 KeyExpression (com.apple.foundationdb.record.metadata.expressions.KeyExpression)14 RecordMetaDataProto (com.apple.foundationdb.record.RecordMetaDataProto)13 ByteString (com.google.protobuf.ByteString)13 Tuple (com.apple.foundationdb.tuple.Tuple)12 Collections (java.util.Collections)12 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)11 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)11 Assertions.assertNotNull (org.junit.jupiter.api.Assertions.assertNotNull)11 Assertions.assertNull (org.junit.jupiter.api.Assertions.assertNull)11 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)11 RecordCoreException (com.apple.foundationdb.record.RecordCoreException)10 BooleanSource (com.apple.test.BooleanSource)10