diff options
author | Yen-Chieh Sung <sungyc@google.com> | 2023-07-06 18:01:13 -0700 |
---|---|---|
committer | Yen-Chieh Sung <sungyc@google.com> | 2023-07-06 19:39:11 -0700 |
commit | 4ac48569941d4f48b1a9bffdaf4abb2a3e8e9269 (patch) | |
tree | 076d8d961026f2800a6ca41106aa11d54527a29b /icing/schema/schema-store_test.cc | |
parent | f1f564329ad560f580c03f9e928057ad4e4fadc9 (diff) | |
download | icing-4ac48569941d4f48b1a9bffdaf4abb2a3e8e9269.tar.gz |
Update Icing from upstream.
Descriptions:
========================================================================
[Icing] Extend document store uri mapper
========================================================================
Implement dirty flag in PersistentStorage
========================================================================
[Icing][version 2][1/x] Implement ShouldRebuildDerivedFiles
========================================================================
[Icing][version 2][2/x] Bump kVersion to 2
========================================================================
[NumericSearch][optimization] Change numeric index bucket splitting threshold
========================================================================
[NumericSearch][optimization] Flag guard integer index bucket splitting threshold
========================================================================
Bug: 193919210
Bug: 280094535
Bug: 288969109
Bug: 259743562
NO_IFTTT="Path is only valid in G3."
Change-Id: Ie1e6f5969549f6c945ea32d03c724850ff5600a9
Diffstat (limited to 'icing/schema/schema-store_test.cc')
-rw-r--r-- | icing/schema/schema-store_test.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/icing/schema/schema-store_test.cc b/icing/schema/schema-store_test.cc index 3298b75..8fc51e7 100644 --- a/icing/schema/schema-store_test.cc +++ b/icing/schema/schema-store_test.cc @@ -2722,7 +2722,8 @@ TEST_F(SchemaStoreTest, MigrateSchemaVersionZeroUpgradeNoChange) { } } -TEST_F(SchemaStoreTest, MigrateSchemaRollbackDiscardsOverlaySchema) { +TEST_F(SchemaStoreTest, + MigrateSchemaRollbackDiscardsIncompatibleOverlaySchema) { // Because we are upgrading from version zero, the schema must be compatible // with version zero. SchemaTypeConfigProto type_a = @@ -2749,12 +2750,12 @@ TEST_F(SchemaStoreTest, MigrateSchemaRollbackDiscardsOverlaySchema) { IsOkAndHolds(Pointee(EqualsProto(schema)))); } - // Rollback to a version before kVersion. The schema header will declare that - // the overlay is compatible with any version starting with kVersion. So - // kVersion - 1 is incompatible and will throw out the schema. + // Rollback to a version before kVersionOne. The schema header will declare + // that the overlay is compatible with any version starting with kVersionOne. + // So kVersionOne - 1 is incompatible and will throw out the schema. ICING_EXPECT_OK(SchemaStore::MigrateSchema( &filesystem_, schema_store_dir_, version_util::StateChange::kRollBack, - version_util::kVersion - 1)); + version_util::kVersionOne - 1)); { // Create a new of the schema store and check that we fell back to the @@ -2777,7 +2778,7 @@ TEST_F(SchemaStoreTest, MigrateSchemaRollbackDiscardsOverlaySchema) { } } -TEST_F(SchemaStoreTest, MigrateSchemaCompatibleRollbackKeepsOverlaySchema) { +TEST_F(SchemaStoreTest, MigrateSchemaRollbackKeepsCompatibleOverlaySchema) { // Because we are upgrading from version zero, the schema must be compatible // with version zero. SchemaTypeConfigProto type_a = @@ -2846,12 +2847,12 @@ TEST_F(SchemaStoreTest, MigrateSchemaRollforwardRetainsBaseSchema) { IsOkAndHolds(Pointee(EqualsProto(schema)))); } - // Rollback to a version before kVersion. The schema header will declare that - // the overlay is compatible with any version starting with kVersion. So - // kVersion - 1 is incompatible and will throw out the schema. + // Rollback to a version before kVersionOne. The schema header will declare + // that the overlay is compatible with any version starting with kVersionOne. + // So kVersionOne - 1 is incompatible and will throw out the schema. ICING_EXPECT_OK(SchemaStore::MigrateSchema( &filesystem_, schema_store_dir_, version_util::StateChange::kRollBack, - version_util::kVersion - 1)); + version_util::kVersionOne - 1)); SchemaTypeConfigProto other_type_a = SchemaTypeConfigBuilder() |